[wxPython] Running the Demo from PythonWin

Hi,

I posted a similar message a while ago and didn't hear anything. I'll try
again.

If I run the demo.py from PythonWin (Python 2.1, Win2K) multiple times it
works fine.

If I run the demo from PythonWin using main.py it works the first time, but
then it crashes the next time I try to run it. Anyone know what is causing
this and why I have to run demo.py, which just imports Main and runs
Main.main() to prevent the crash?

Thanks,

Gene

···

**********************************************************************
This e-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.

Please notify the sender or the e-mail administrator mailadmin@renre.com by e-mail if you are not the intended recipient. If you are not the intended recipient, you may not copy, disclose, or distribute this message or its contents to any other person and any such actions may be unlawful.

Renaissance Reinsurance Ltd. reserves the right to monitor and review the content of all messages sent to or from this e-mail address.

*******************************************************************

I posted a similar message a while ago and didn't hear anything. I'll try
again.

If I run the demo.py from PythonWin (Python 2.1, Win2K) multiple times it
works fine.

If I run the demo from PythonWin using main.py it works the first time,

but

then it crashes the next time I try to run it. Anyone know what is causing
this and why I have to run demo.py, which just imports Main and runs
Main.main() to prevent the crash?

My guess is that it has something to do with the different way the namespace
is setup for Main.py. When run directly then it is the __main__ module,
when imported from demo then it is the Main module. Maybe PythonWin doesn't
completely cleanup __main__ or something.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!