VPython: Using scene.exit to catch Windows' close button

Dagur lusifer__ at hotmail.com
Tue Apr 29 09:26:12 EDT 2003


Hello group,

I'm developing an interactive application using the latest VPython
under Python 2.2.2/Windows XP.

I'm having problems using VPythons scene.exit to detect whether the
VPython window's Exit button (the little 'X') has been pressed. The
VPython documentation tells me to set scene.exit = 0, which is
supposed to disable automatically closing the window. I have done
this, however I can't seem to change Vpython's behavior. It still
closes the window immediately, instead of letting my script do its
clean-up routine.

I'd be happy to know if VPython's documentation doesn't match its
behavior, or whether I'm missing something obvious.

Thanks in advance,

Dagur Dagsson




More information about the Python-list mailing list