在linux中编译python脚本

前端之家收集整理的这篇文章主要介绍了在linux中编译python脚本前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
所以我有一个依赖于几个模块的 python脚本.特别是pexpect和pyinoitify.我知道你可以将一个python脚本编译成windows中的.exe,但在linux中是否有相对等价的东西?我不关心它是二进制文件,我只是希望能够分发我的脚本而不需要单独安装pexpect和pyinotify.这可能/有价值吗?

解决方法

cx_Freeze是一种将Python脚本“冻结”为独立二进制形式的跨平台方式.根据他们的网站:

cx_Freeze is a set of scripts and modules for freezing Python scripts into executables in much the same way that py2exe and py2app do. Unlike these two tools,cx_Freeze is cross platform and should work on any platform that Python itself works on. It requires Python 2.3 or higher since it makes use of the zip import facility which was introduced in that version.

猜你在找的Linux相关文章