[Twisted-Python] having trouble displaying Tkinter photo images with twisted, help?

John Benson jsbenson at bensonsystems.com
Thu Dec 4 23:15:44 EST 2003


The following toy program has no trouble displaying a GIF image:

from twisted.internet import protocol, reactor, tksupport
import Tkinter
class FingerProtocol(protocol.Protocol):
    pass
class FingerFactory(protocol.ServerFactory):
    protocol = FingerProtocol
root = Tkinter.Tk()
tksupport.install(root)
iconimage = Tkinter.PhotoImage(master=root, file='buzzard.gif')
Tkinter.Button(image=iconimage).pack()
reactor.listenTCP(1079, FingerFactory())
reactor.run()

However, I have a larger program that gets a blank image when the

iconimage = Tkinter.PhotoImage(master=root, file='buzzard.gif')
Tkinter.Button(image=iconimage).pack()

code runs. I've tried moving the code around and come up with the same
result: no image, although a widget is created and displayed as a blank
area.

Has anyone run across this before, and is there a workaround?






More information about the Twisted-Python mailing list