I am developing a project that I want to release as closed source, but its written in python, and you can open any file with a text editor to see the code, so not ideal. I use pyinstaller to compile the project, but that only "hides" the main file, and the rest of them are still accesible, which is not ideal at all. I know that python compiles the imported files with cpython, and those are the .pyc files in the pycache folder, but I am also aware that these files can be decompiled easily, so that isn't a good solution. Is there any way I can compile my python packages and to make them non-readable by the user but still be importable by python?
Asked
Active
Viewed 181 times
0
-
Python.org on [Concealing ("Protecting") Source Code](https://wiki.python.org/moin/Asking%20for%20Help/How%20do%20you%20protect%20Python%20source%20code%3F) – DarrylG Jul 28 '20 at 07:26
1 Answers
2
You might want to look into Cython
Cython can compile your python code into native C while still being available to be imported from python.

Nicklas Tegner
- 36
- 3