def get_figure_window_geometry(fig='<STR_LIT>'):
if type(fig)==str:          fig = _pylab.gcf()<EOL>elif _fun.is_a_number(fig): fig = _pylab.figure(fig)<EOL>if _pylab.get_backend().find('<STR_LIT>') >= <NUM_LIT:0>:<EOL><INDENT>size = fig.canvas.window().size()<EOL>pos  = fig.canvas.window().pos()<EOL>return [[pos.x(),pos.y()], [size.width(),size.height()]]<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>")<EOL>return None<EOL><DEDENT>
This will currently only work for Qt4Agg and WXAgg backends.
Returns position, size

postion = [x, y]
size    = [width, height]

fig can be 'gcf', a number, or a figure object.