From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2009-03-06 15:11:10
|
On Thu, 5 Mar 2009 14:54:20 +0530 GoWtHaM NaRiSiPaLli <nar...@gm...> wrote: > I am looking at a way to gracefully closing the PythonCard > application and report back as log give some information or do the > clean up before ending the script. > To present a sample, heres some code written over minimal.py script. > > <snip> > > It never prints the statement in except whenever I end the program > with ctrl + c. > > On a normal loop, like this- It works and prints the statement.. > > <snip> > > Is there an alternate way of doing this so that I can capture the > keyboard interrupt before the script closes. Are you actually able to shutdown the application with ctrl + c ? I didn't expect it to work when I tried it here, and it didn't on Windows or OpenBSD, so it's difficult to replicate the problem. Since ctrl + c is the standard copy shortcut that didn't surprise me...I would have expected to have to do some kind of special keyboard event handling. What operating system are you running? -- XXXXXXXXXXX |