Home/Support/Support Forum/Is there any way to hide the python source code?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Is there any way to hide the python source code?

0 votes
I am developing python source code to be used in connectport x2 and this source code has to be exported. Is there any way to convert it to binary form? I changed it to .pyc but it does not work at the connectport x2 gateway.
asked Mar 27, 2018 in 3rd Party Python and API development in other Languages by leejongkook New to the Community (0 points)

Please log in or register to answer this question.

2 Answers

0 votes
Hi,
Yes, you can try tools which embed modules and a Python interpreter together into an executable, like PyInstaller and py2exe. These tools would offer you an additional layer of obfuscation over the bytecode files.
answered Mar 30, 2018 by Lyndaa New to the Community (1 point)
0 votes
Shielding your Python sources from undesirable perusers is less demanding said than done, on the grounds that .pyc bytecode is decompileable and the jumbling is effortlessly figured out. It took me a while to make sense of an appropriate method to conceal Python code…
Meet Cython, an enhancing static compiler that takes your .py modules and makes an interpretation of them to high-performant C documents. Coming about C documents can be gathered into local parallel libraries with no exertion. At the point when the gathering is done there's no real way to switch arranged libraries back to lucid Python source code! Cython underpins both Python 2 and 3, including the advanced async/anticipate grammar. From my experience, the main thing it couldn't do is nonconcurrent generators.
answered Apr 24, 2018 by Lokesh0561 New to the Community (1 point)
...