开发者

Distributing Python programs

开发者 https://www.devze.com 2022-12-14 13:19 出处:网络
How do I let my friends use my Python programs? They don\'t have python installed, but they can use command line programs. I don\'t have the skill to write GUI.

How do I let my friends use my Python programs? They don't have python installed, but they can use command line programs. I don't have the skill to write GUI.

Let, say I am writing some calculus calculator, with a lot of custom modu开发者_Python百科les and files. How do I share it?


You could use something like py2exe to convert your Python program into an executable.


another alternative you can try is Portable python.


You have the options presented thus far: Portable Python and Py2Exe. Either can be pretty good.

My suggestion: encourage your friends to install Python! As you know, it's free, and simple to install and download. If they want your application bad enough, installing Python will be a no-brainer.


In 2019 I have been using PyInstaller mostly, works very well for all of my Python scripts I wish to convert to a single runnable exe.


A less general, but lightweight and simple way of putting many Python files into 1 or 2 files (Python programs) is Fredrik Lundh's squeeze program. When you "squeeze" a bunch of Python programs and modules, you can often produce a single Python program. People still need Python to run it (but it's included in most Unix distributions, including Mac OS X), but you can easily distribute it, as your program and modules are all bunched up in a single file.


http://hackerboss.com/how-to-distribute-commercial-python-applications/ mentions using preinstalled, bundled, and frozen interpreters, but i suggest for speed and security, to compile using Shed Skin, Iron Python, Cython, or PyPy. The psyco module also helps with speed if your code is old.

0

精彩评论

暂无评论...
验证码 换一张
取 消