Problem using compileall

Stephen Hansen apt.shansen at gmail.com
Tue Feb 3 12:12:53 EST 2009


> Try this to discover whether the file actually contains a NUL byte or not:
>
> f = open("BulkListClass.py","rb")
> src = f.read()
> i = src.index('\0')
> print "found NUL at index", i
> print repr(src[i-20:i+20])

Doh. It did. How the heck did that get there! I hadn't thought to
actually look -- which seems terribly dense in retrospect -- because I
just assumed whatever regular-Python did to compile the same file,
compileall'd duplicate. Doh. :)

Thanks.

--S



More information about the Python-list mailing list