0
Is it possible that I can hide part of my code and other can't see but it runs??
For example I want to hide this code Print("hello") but I can see hello in teminal Thanks
2 Answers
0
A.R.T
No it's not possible.
0
Well that depends...
You want to hide the âcodeâ but say you can see hello in the terminal.
Thatâs because you are printing the output to the terminal.
If you were to run:
(âhello") or str = âhelloâ
That would not be seen in the terminal.
So if itâs hiding terminal output you mean, donât use print.
If you mean hiding the code to distribute, this is very difficult with Python being an interpreted language.
You can convert to bytecode, but thatâs easily reveresed.
You can compile to an exe (using libraries like freeze, py2exe etc). However this comes with the downside that the python interpreter has to be included to run, usually creates large executables and slow program startup times. Even this can be reversed pretty easy.
The other alternative is obfuscation, but again there are ways and means of reversing.
Python is not a good choice for concealed source distribution.