Compiling main script into .pyc

Ned Batchelder ned at nedbatchelder.com
Thu Jan 16 22:07:44 EST 2014


On 1/16/14 8:01 PM, Sam wrote:
> One thing I observe about python byte-code compiling is that the main script does not gets compiled into .pyc. Only imported modules are compiled into .pyc.
>
> May I know how can I compile the main script into .pyc? It is to inconvenience potential copy-cats.
>

The standard library has the compileall module that can be used to 
create .pyc files from .py files, but as we've been discussing in 
another thread, you may not want .pyc files.

-- 
Ned Batchelder, http://nedbatchelder.com




More information about the Python-list mailing list