compiling code

Peter Hansen peter at engcorp.com
Wed Feb 12 08:45:21 EST 2003


Sam Marrocco wrote:
> 
> I've noticed that my python modules compile themselves into .pyc files,
> which are nice and unreadable to users. However, my main/startup file
> (whatever that may be) stays as a text-readable .py or .pyw file.
> 
> Is it possible to compile this initial file?

Yes, but because it sounds like you are interest in obfuscating the
source to prevent others from seeing it, you should know that,
roughly speaking, this is not possible.  Check the archives for
extensive discussion of this issue, then consider making other
things a priority instead... like having a decent licence.

-Peter




More information about the Python-list mailing list