clearing down all instances in python

Paul Brian paul1brian at yahoo.com
Tue Feb 26 10:09:07 EST 2002


Dear all,

forgive me for being a bit vague:

A while ago I am sure I read that someone (steve purcell?) had problems with
unittesting and worked out that python was keeping versions of modules in
memory that they had changed in testing, thus running a version that they
thought no longer existed.

They wrote something that cleared out all modules and classes in python
memory each time they ran their unittests. Apparently it was a long chore.
It seemed to be more convoluted than "reload"ing modules for some reason.

I am having similar problems, and wondered

1) Can anyone remember reading similar? Deja / google no help.
2) py_finalize from C API seems to do a similar job.  How feasible is
calling a C API function from within the python interpeter (I think I am
getting confused)

Basically I am interested in clearing down the python interpreter as if from
new, but without going through the actual from new.

Any ideas?

----------------------------------
Paul Brian
"No sig and lovin' it!"






More information about the Python-list mailing list