Author john.admanski
Recipients john.admanski
Date 2010-09-13.16:17:14
SpamBayes Score 1.22262e-11
Marked as misclassified No
Message-id <>
When creating a ZipExtFile through, 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 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:21john.admanskisetrecipients: + john.admanski
2010-09-13 16:17:20john.admanskisetmessageid: <>
2010-09-13 16:17:15john.admanskilinkissue9846 messages
2010-09-13 16:17:14john.admanskicreate