samedi 16 décembre 2006

[Python] How-to: hide the source code when distributing a Python script ?

Create a .pyc file with your script:

>>> import py_compile
>>> py_compile.compile('myscript.py')

This will produce myscript.pyc (c for compiled) that you can distribute instead of the .py (python will run the .pyc).

Aucun commentaire: