I know wxpython is supposed to be better than tkinter...
Not if your code needs to run on a Mac ...
But anyway. How can I get tkinter to load up a jpg?
The best bet is to get PIL, the Python Imaging Library. Link
here.
Then you can construct some simple code like
import Image, ImageTk
im = Image.open(filename) # loads a wide variety of file types as a
# PIL image. The PIL image has a
# rich set of methods
tkim = ImageTk.PhotoImage(im) # Converts to Tkinter-friendly
# image type
From there, you can pass the tkim object as a parameter to anything that will accept an image: a Label(), a Button(), a Canvas() ...
Hope it helps,
Jeff
Reputation Points: 92
Solved Threads: 156
Practically a Master Poster
Offline 608 posts
since Jul 2006