[Tutor] Python Image Library
mysecretrobotfactory at gmail.com
Thu May 18 13:13:29 EDT 2017
I'll use it when I get to it! Thanks!
For now, I use this, as suggested by eryk sun:
it doesn't pop the window.
On Thu, May 18, 2017 at 10:06 AM, Alan Gauld via Tutor <tutor at python.org>
> On 18/05/17 16:43, Michael C wrote:
> > os.startfile('1.bmp')
> > works like a charm!
> > Now I need to figure out how to close this window once I finish with it!
> Sadly that is manual. Unless you care to write code to search for the
> process and use the Windows API to kill it off.
> If you really want the image under your programs control you
> need to build a GUI, even if a very basic one and display
> the image in a window. A very simplistic Tkinter app will
> do for simply splatting an image on screen then closing
> it later. But it all depends what else you need the app to
> do how complex it gets after that.
> Here is some untested Tkinter code to display an image
> for 2 seconds:
> import tkinter as tk
> top = tk.Tk()
> tk.Label(top, image='1.bmp').pack()
> top.after(2000, top.quit)
> If not that, something quite like it...
> Alan G
> Author of the Learn to Program web site
> Follow my photo-blog on Flickr at:
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
More information about the Tutor