[EMAIL PROTECTED] wrote: > I am trying to make a program that will basically simulate a chess > clock in python. To do this I have two threads running, one that > updates the currently running clock, and one that watches for a > keypress. I am using the effbot Console module, and that is where I get > the events for the keypresses. But when I press space it crashes > shortly after. The program stops, the Console closes, and windows says > that the program pythonw.exe has had an unexpected reason to shut down. > I am using python2.5.
Try not (re)using an object created in a certain thread in another thread. You're creating a console object "c" and use it in both threads. Try creating the console object for each thread by itself, i.e. remove the global "c = Console.getconsole()" and replace it by a getconsole() inside each thread class. I don't have the Console module so I don't know if it fixes things for you, but give it a try :) --Irmen -- http://mail.python.org/mailman/listinfo/python-list