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 Respostas
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.