compileall binaries don't run!?

Daniel danieljng at yahoo.com
Wed Jan 7 00:32:40 EST 2004


Hi,

I'm trying to use compileall to make pyc files from py files (without
having to execute them at the same time).

This is the first time I've used compileall, so maybe I've done
something silly.

I run it like this:

python /usr/lib/python2.2/compileall.py /home/me/mySourceDir

And the output looks fine, resulting in a bunch of pyc files.

Then I try running the pyc file eg.:

/home/me/mySourceDir/doodad.pyc

But get the following error:
bash: ./doodad.pyc: cannot execute binary file

I notice that when I execute doodad.py, no pyc file is generated. Does
this mean that Python can only make pyc files from some BUT NOT ALL py
files? Is this my problem?

I've ensured file access permissions are correct.

Thanks,
Dan.



More information about the Python-list mailing list