[PyKDE] Qt shutting down the process/Python interpreter - ne
Jim Bublitz
jbublitz at nwinternet.com
Fri Nov 8 18:11:01 GMT 2002
On 08-Nov-02 Michael Lauer wrote:
> Now, my question... is there something I can do at python level
> or is there something we can do at PyQt level to change this
> behaviour?
If you call sys.exit() in Python it always raises a SystemExit
exception. Does that happen here? If so, you can trap it and cancel
it or whatever you need to do. Is there a way you can cause
SystemExit to be raised? (I'm not sure if this happens at program
termination without an explicit sys.exit() call).
That might also be a solution for the other people with
destructor-call problems. Then again, it might not.
Alternatively, can you have soemthing set a flag if QApplication
launches successfully? For example:
app = QApplication (...)
...
while True:
app.exec_loop ()
if flag:
break
<do something to fix whatever
caused app.exec_loop() to
exit early>
You can subclass QApplication or install a temporary eventHandler if
necessary.
Jim
More information about the PyQt
mailing list