How protect proprietary Python code? (bytecode obfuscation?, what better?)

gangesmaster tomerfiliba at gmail.com
Tue Apr 18 05:26:57 EDT 2006


okay, i got the name wrong. i wasn't trying to provide production-level
code, just a snippet. the function you want is
PyRun_SimpleString( const char *command)

#include <python.h>

char secret_code[] = "print 'moshe'";

int main()
{
    return PyRun_SimpleString(secret_code);
}

and you need to link with python24.lib or whatever the object file is
for your platform.



-tomer




More information about the Python-list mailing list