I want to use exec
to execute python code (using the byte code, instead of the raw text that python will interpret). It’s all for a competition where you can see the code of the other competitors, I want to be able to hide my code well enough so people won’t bother messing with my code.
How do I do that?
6
That’s most likely not going to work. Even if you provide them with byte code only, it’s usually possible to simply deassemble the code.
You’ll lose comments, formatting and possibly variable names that way though. Code obfuscation might be an option, but at the same time you’re not really hiding anything (which in the end is impossible, even if someone has to interpret machine code instructions in the end).
2