commit | 05f9dce34f3a91e1a9d69e3e85c93c506e0cc6ba | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Thu Feb 19 20:58:44 1998 +0000 |
committer | Guido van Rossum <guido@python.org> | Thu Feb 19 20:58:44 1998 +0000 |
tree | bb7c62cd1102037ed02bb70378e5616cf98bb210 | |
parent | bd36dbaaa53929e1bd8609e734c7a0fa128b7bd2 [diff] |
Moved clear_carefully() to _PyModule_Clear() in moduleobject.c (modified) and use that. Some differences in the cleanup algorithm: - Clear __main__ before the other modules. - Delete more sys variables: including ps1, ps2, exitfunc, argv, and even path -- this will prevent new imports! - Restore stdin, stdout, stderr from __stdin__, __stdout__, __stderr__, effectively deleting hooks that the user might have installed -- so their (the hooks') destructors will run.