PyZipFile

Emile van Sebille emile at fenx.com
Fri Jul 13 08:13:14 EDT 2001


--

Emile van Sebille
emile at fenx.com

---------
"gods1child" <alankarmisra at hotmail.com> wrote in message
news:25b2e0d9.0107122104.50347e10 at posting.google.com...
> 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