如何编译一个Python包到一个dll

如何编译一个Python包到一个dll

本文介绍了如何编译一个Python包到一个dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 嗯,我有一个Python包。我需要将其编译为dll,然后分发它的方式很容易导入。 如何?您可以建议 *。pyc 。但我在某处读到任何 *。pyc 可以轻松反编译! 更新: 遵循这些: 1)我写了一个python包 2)想分发它 3)不要分发源代码 4)* .pyc是可反编译的>>源可以提取! 5)dll是标准的解决方案写出你想隐藏在Cython中的所有内容,并将其编译为 pyd 。这就像你可以得到编译的python代码。 此外,dll不是一个标准,不是在Python世界。他们也不便携。 Well, I have a Python package. I need to compile it as dll before distribute it in a way easily importable. How? You may suggest that *.pyc. But I read somewhere any *.pyc can be easily decompiled!Update:Follow these:1) I wrote a python package2) want to distribute it3) do NOT want distribute the source4) *.pyc is decompilable >> source can be extracted!5) dll is standard 解决方案 Write everything you want to hide in Cython, and compile it to pyd. That's as close as you can get to making compiled python code.Also, dll is not a standard, not in Python world. They're not portable, either. 这篇关于如何编译一个Python包到一个dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-04 22:54