error on destroying

Remco Oosten wrote:

"""
Exception exceptions.NameError: "global name 'sys' is not defined" in <bound method NewClass.__del__ of <base.controls.NewClass instance; proxy of C++ wxDialog instance at _84561e0_wxDialog_p>> ignored
"""

When the Python interpreter shuts down it goes through several cycles of forcibly removing objects and modules until everything is gone. So sys probably got removed before your NewClass.__del__ was called. If you call the dialog's Destroy before your app completely exits then you can avoid the exception.

···

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

That works, thanks.
I thought it might be something like that.
At first I was thinking that I should do something to prevent this situation.

But if it doesn't make much difference, I've created a weakref dictionary
that's used to close any dialogs that still exist.

···

On Monday 19 July 2004 20:26, Robin Dunn wrote:

Remco Oosten wrote:
> """
> Exception exceptions.NameError: "global name 'sys' is not defined" in
> <bound method NewClass.__del__ of <base.controls.NewClass instance; proxy
> of C++ wxDialog instance at _84561e0_wxDialog_p>> ignored
> """

When the Python interpreter shuts down it goes through several cycles of
  forcibly removing objects and modules until everything is gone. So
sys probably got removed before your NewClass.__del__ was called. If
you call the dialog's Destroy before your app completely exits then you
can avoid the exception.