compileall binaries don't run!?

Daniel danieljng at
Wed Jan 7 06:32:40 CET 2004


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/ /home/me/mySourceDir

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

Then I try running the pyc file eg.:


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

I notice that when I execute, 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.


More information about the Python-list mailing list