Re: Problem with capturing exception
Neil Hughes <[email protected]> Fri, 6 Mar 2009 15:10:46 +0000
| Newsgroups | gmane.comp.python.pythoncard |
|---|---|
| Organization | Support4Omega Ltd. |
| Message-ID | <[email protected]> |
On Thu, 5 Mar 2009 14:54:20 +0530 GoWtHaM NaRiSiPaLli <[email protected]> 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? -- Neil Hughes ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H