Krc*_*n U 4 python tkinter paramiko windows-7-x64
我刚刚用Python完成了我的脚本,我希望我的同事也能使用它.它运行在python 2.7 Windows 7 64位专业环境中.现在问题是:
如何让他们以简单的方式使用我的脚本?
首选是艰难的方式,让他们在他们的机器上安装python,然后安装paramiko,Tkinter.我很难找到并安装这些模块(特别是对于Windows二进制文件),并且不想再次遇到同样的问题.
我是这个环境中的新手,我认为这个问题会有实际的解决方案.所以我想问你们,任何想法都赞赏.
使用 cx_freeze 我检查过。
cx_Freeze 是一个用于将 python 脚本创建为可执行(.exe)文件的模块。这是非常简单的方法。
从http://www.lfd.uci.edu/~gohlke/pythonlibs/下载并安装适用于您的 python 版本的 cx_Freeze windows 二进制文件
找到源代码文件夹的位置。例如 - 我创建了一个 test.py 并将其存储在 c:\samp 中。c:\samp\test.py
x="hai this is an exe file created from python scripts using cxfreeze. Press Enter to exit >> "
y=input(x)
Run Code Online (Sandbox Code Playgroud)创建一个文件夹来存储构建文件(.exe 和其他文件)。例如-我创建了一个文件夹 c:\samp\build\
打开命令提示符(开始->运行输入“cmd”按回车键)并输入console
C:\Documents and Settings\suh>c:\python32\scripts\cxfreeze c:\samp\test.py --target-dir=c:\samp\build
如需更多选项,请输入C:\Documents and Settings\suh>c:\python32\scripts\cxfreeze -help