Robert Collins wrote:
> As the scanner is given an open object, its the callers responsibility
> to flush and close (going from memory of the code).
>
Which function is being used? The recommended one is:
def dump_all_objects(outf):
...
if isinstance(outf, basestring):
opened = True
outf = open(outf, 'wb')
else:
opened = False
all_objs = gc.get_objects()
dump_all_referenced(outf, all_objs, is_pending=True)
del all_objs[:]
if opened: outf.close()
else: outf.flush()
Which I'll note both flushes if handed an object, and closes otherwise.
dump_gc_objects() also does the same.
dump_all_referenced() does not, but
a) Probably could
b) Isn't really meant as the top-level function to call.
(Note: I'm not 100% sure what ended up in the release, I generally
recommend running from trunk right now.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> As the scanner is given an open object, its the callers responsibility
> to flush and close (going from memory of the code).
>
Which function is being used? The recommended one is: objects( outf): all_referenced( outf, all_objs, is_pending=True)
outf.close( )
outf.flush( )
def dump_all_
...
if isinstance(outf, basestring):
opened = True
outf = open(outf, 'wb')
else:
opened = False
all_objs = gc.get_objects()
dump_
del all_objs[:]
if opened:
else:
Which I'll note both flushes if handed an object, and closes otherwise.
dump_gc_objects() also does the same.
dump_all_ referenced( ) does not, but
a) Probably could
b) Isn't really meant as the top-level function to call.
(Note: I'm not 100% sure what ended up in the release, I generally enigmail. mozdev. org/
recommend running from trunk right now.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkv xwHYACgkQJdeBCY SNAAMjbQCgrE0Ky PvlMsvg+ NEh5oxsRcmS TO35XUetO61aKWc ZC
M/kAoLPYwl4lkUa
=93jT
-----END PGP SIGNATURE-----