如何制作python应用程序 [英] how to make a python application

查看:128
本文介绍了如何制作python应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我在一个月内学习python语言。一切都很顺利。但好奇的想知道,如何使用python为windows创建一个.exe文件?

解决方案

你没有。



Python由Python运行时解释,当您键入python myscript.py时,它将其转换为字节码(pyc),然后在后台运行它。这必须在每次运行python脚本时发生,所以无论你给脚本运行它就像你一样。



我还没有找到任何原生图像python的生成器,因为Python要求在客户端系统上安装运行时。


与解决方案1的作者Ron不同,我知道至少有一个用于生成Windows可执行文件的产品,称为py2exe:

http://en.wikipedia.org/wiki/Py2exe [ ^ ],

http://www.py2exe.org/ [ ^ ]。



祝你好运,

-SA

Hi!
I'm learning python language over a month. Everything is going smoothly. But curious mind wants to know, how do I make an .exe file for windows using python?

解决方案

You don't.

Python is interpreted by the Python runtime, when you type "python myscript.py" it converts it into bytecode (pyc) and then runs it in the background. This has to happen each time you run a python script, so whoever you give the script to runs it just like you would.

I haven't found any native image generators for python, since Python requires the runtime to be installed on the client system.


Unlike Ron, the author of Solution 1, I know at least one product used to produce executable files for Windows, called py2exe:
http://en.wikipedia.org/wiki/Py2exe[^],
http://www.py2exe.org/[^].

Good luck,
—SA


这篇关于如何制作python应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆