PyZipFile

gods1child alankarmisra at hotmail.com
Fri Jul 13 07:04:01 CEST 2001


Why wont the following code work? Thanx.

import zipfile
p = zipfile.PyZipFile("c:\\pe\\arc.zip","w",zipfile.ZIP_STORED)
p.writepy("c:\\pe")
p.close()
p = zipfile.PyZipFile("c:\\pe\\arc.zip","r",zipfile.ZIP_STORED)
eval(p.read("pe/lang.pyc"))
p.close()

----------------------------------------------------
Traceback (most recent call last):
  File "C:/pe/nest.py", line 6, in ?
    eval(p.read("pe/lang.pyc"))
TypeError: expected string without null bytes



More information about the Python-list mailing list