Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualNickie

Posted 22 April 2013 - 09:12 AM

Simply, no.

The standart implementation of python(CPython) compiles the code only to bytecode.

 

For freeze - It saves the python bytecode as a C array and compile it in exe. then It simply run it by the interpreter.

I guess py2exe use a similar way(as far as I know it does not require compiler).

P.S.

http://stackoverflow.com/questions/2912404/how-does-py2exe-actually-and-simply-explained-work

If you don't want to read this: It still uses the standart interpreter to execute python bytecode. It is not turned into machine code.

 

Basically if someone decide to read your code or modify it, you cannot stop him. (Even if its in machine code/bytecode)

 

Also python bytecode keeps variables and function names, so I guess the source can be completely recovered from bytecode(without comments).


#1Nickie

Posted 22 April 2013 - 09:08 AM

Simply, no.

The standart implementation of python(CPython) compiles the code only to bytecode.

 

For freeze - It saves the python bytecode as a C array and compile it in exe. then It simply run it by the interpreter.

I guess py2exe use a similar way(as far as I know it does not require compiler).

Basically if someone decide to read your code or modify it, you cannot stop him. (Even if its in machine code/bytecode)


PARTNERS