En Tue, 03 Feb 2009 05:53:06 -0200, Stephen Hansen <apt.shan...@gmail.com> escribió:

I'm having a slight problem with pre-compiling some files for distribution
that I'm not sure where to even look for.

An excerpt from an output:

    C:\mother\Python24\core\application\sysconfig>python -m compileall .
    Listing . ...
    Compiling .\BulkListClass.py ...
    Sorry: TypeError: ('compile() expected string without null bytes',)
    Compiling .\BulkUserImporter.py ...

The BulkListClass is then not creating a PYC.

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])


--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to