[Patches] [ python-Patches-651621 ] small ZipFile.writestr() enhancement
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 12 Dec 2002 03:16:45 -0800
Patches item #651621, was opened at 2002-12-10 21:31
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=651621&group_id=5470
Category: Library (Lib)
Group: Python 2.3
Status: Open
>Resolution: Accepted
Priority: 5
Submitted By: Just van Rossum (jvr)
>Assigned to: Just van Rossum (jvr)
Summary: small ZipFile.writestr() enhancement
Initial Comment:
This patch allows ZipFile.writestr() to be called with
an archive file name instead of a ZipInfo instance:
z = ZipFile("myarchive.zip", "w")
z.writestr("foo/baz/file.ext", data)
z.close()
I find the current writestr() method very inconvenient
for simple (but common) things.
If called with a file name instead of a ZipInfo
instance, the date_time is set to now, which makes most
sense for anonymous data.
The patch also patches Doc/Lib/libzipfile.tex.
Just
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2002-12-12 12:16
Message:
Logged In: YES
user_id=21627
Looks fine, please apply.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=651621&group_id=5470