Stealing focus: PIL

Fredrik Lundh fredrik at pythonware.com
Tue Nov 29 05:00:25 EST 2005


damonwischik at gmail.com wrote:

> I'm using the Python Image Library (PIL) for Python 2.4.
>
> If I have an image and I show it
>   from PIL import Image
>   im = Image.new('RGB',100,100)
>   im.show()
> then the output window steals focus. It's very handy to use
> an image to show the progress of execution for my program,
> but the computer is unusable when focus keeps on being stolen
> every few seconds. How can I prevent Image.show() from stealing
> focus?

PIL runs an external utility [1] to display the image, so this is more of
a window manager issue than a PIL issue.

</F>

1) "xv" by default, but this may be changed by distributors.






More information about the Python-list mailing list