#Download a gif from the web, and display in a GUI: #Set up a window from tkinter import * root = Tk() #Download the image import urllib.request url = "http://www.summet.com/dmsi/html/_images/top.gif" u = urllib.request.urlopen(url) raw_data = u.read() u.close() #Convert the bytes to a PhotoImage in memory import base64 b64_data = base64.encodebytes(raw_data) image = PhotoImage(data=b64_data) #Display the photo image. label = Label(root, image=image) label.pack() #Show the window. root.mainloop()