python obfuscate

Stefan Behnel stefan_ml at behnel.de
Sun Apr 13 00:58:12 EDT 2014


Sturla Molden, 11.04.2014 11:17:
> Joshua Landau wrote:
> 
>> However, if this really is your major blocker to using Python, I
>> suggest compiling with Cython.
> 
> Cython restains all the code as text, e.g. to readable generate exceptions.

No, it actually doesn't. It only keeps the code in C comments, to make
reading the generated code easier. Those comments get stripped during
compilation, obviously.

The only thing it keeps for its exception tracebacks is the line numbers,
both for the C code (which you can disable) and for the original Python
code. That shouldn't be very telling if you don't have the original source
code.

Stefan


PS: disclaimer: I never needed to obfuscate Python code with Cython, and
this use case is definitely not a design goal of the compiler. No
warranties, see the license.





More information about the Python-list mailing list