Py_single_input and the side-effects...

Carl Banks pavlovevidence at gmail.com
Sun May 30 21:31:11 EDT 2010


On May 30, 3:17 am, moerchendiser2k3 <googler.
1.webmas... at spamgourmet.com> wrote:
> Hi, any idea?

Python doesn't guarantee that objects will be deleted at a specific
time.  There are different reasons why an object might not be deleted.

In command line mode Python keeps a reference to the most recent
result.  I don't know if it happens in general for any
Py_single_input, but you could try to execute a few dummy commands
with Py_single_input to see if it helps.  But if you're relying on
that behavior you really need to consider rethinking your problem.

The only foolproof way to ensure that an object has been finalized is
to do it manually (i.e., provide a finalize method to releases
resources).


Carl Banks



More information about the Python-list mailing list