[ python-Bugs-1514451 ] zipfile "append" mode should create a file if not present

SourceForge.net noreply at sourceforge.net
Thu Jun 29 18:42:47 CEST 2006


Bugs item #1514451, was opened at 2006-06-29 22:12
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1514451&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Ritesh Raj Sarraf (riteshsarraf)
Assigned to: Nobody/Anonymous (nobody)
Summary: zipfile "append" mode should create a file if not present

Initial Comment:
The line 

filename = zipfile.ZipFile(zip_file_name, "a") 

throws an exception if the given filename is not 
present already.

Shouldn't it create a file (in case one is not there) 
since it is "append" mode ??

It's throwing an OSError Exception stating "No such 
file/directory".

Normal convention has been that when opening a file 
in append mode, if the file is not present a new file 
is created.

Why is this non-standard?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1514451&group_id=5470


More information about the Python-bugs-list mailing list