distinction between unzipping bytes and unzipping a file
webcomm
ryandw at gmail.com
Fri Jan 9 14:54:14 EST 2009
On Jan 9, 2:49 pm, webcomm <rya... at gmail.com> wrote:
> decoded = base64.b64decode(datum)
> #datum is a base64 encoded string of data downloaded from a web
> service
> f = open('data.zip', 'wb')
> f.write(decoded)
> f.close()
> x = zipfile.ZipFile('data.zip', 'r')
Sorry, that code is not what I mean to paste. This is what I
intended...
decoded = base64.b64decode(datum)
#datum is a base64 encoded string of data downloaded from a web
service
f = open('data.zip', 'wb')
f.write(decoded)
f.close()
x = popen("unzip data.zip")
More information about the Python-list
mailing list