Re: python wrapper for tk toolkit

dlarsson@sw.seisy.abb.se
Wed, 18 May 1994 14:25:34 +0200

I have trouble terminating python when using the Xt dispatcher.
The following code prints "Exiting python..." twice, and nothing
more happens. See any obvious problems with it?

---------------------------------------
import Xt
from Xtdefs import XtInputReadMask
from sys import exit

def Exit(ud, id):
print "Exiting python..."
exit

Xt.AddTimeOut( 2000, Exit, None );
Xt.AddTimeOut( 10000, Exit, None );
Xt.MainLoop()

Daniel Larsson email: dlarsson@seisy.abb.se
ABB Industrial Systems AB phone: +46-21-34 30 29
S-721 67 Vaesteraas fax : +46-21-34 25 55
Sweden