How to protect and compile python source code into a .so library?

随声附和 提交于 2019-11-30 22:33:57

As mgilson mentioned in the comments, Cython is probably your best bet here. Generally speaking, you can use it to convert your pure-python source code into compiled extension modules. While the primary intent of Cython is for enhanced performance, there shouldn't be any barriers for using it for source-code protection. The extension modules it outputs aren't limited in any special ways so anything you were able to do from within Python before, you should be able to do from the Cython-generated extension modules. Cython does have a few known limitations in terms of supported features that may need to be worked around but, overall, it looks well suited to serving your purpose.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!