Message116322
When creating a ZipExtFile through ZipFile.open, the if the original ZipFile object was created with a filename then a new file object will be opened and given to the ZipExtFile to use for its file operations. There is no explicit mechanism that will allow you to release this file.
ZipExtFile does have an (undocumented?) close method, but this won't actually close the file object that underlies it; probably because it has no way of knowing if it actually owns the file object or if it just has a reference to a file object that belongs to the ZipFile.
You can work around this by destroying references to the ZipExtFile and letting the file's __del__ handle the close for you but this relies on implementation details of ZipExtFile.
Found in Python 3.1 but a look at svn.python.org suggests that this problem is still there in 2.7 and 3.2; however, I haven't actually tried it with them. |
|
Date |
User |
Action |
Args |
2010-09-13 16:17:21 | john.admanski | set | recipients:
+ john.admanski |
2010-09-13 16:17:20 | john.admanski | set | messageid: <1284394640.99.0.715812735205.issue9846@psf.upfronthosting.co.za> |
2010-09-13 16:17:15 | john.admanski | link | issue9846 messages |
2010-09-13 16:17:14 | john.admanski | create | |
|