How to Package Python Scripts

Python is an interpreted, object-oriented programming language that requires installation of the Python interpreter prior to executing Python programs (scripts). However, if you wish to distribute and run Python programs on platforms that do not have the Python interpreter, Python includes a tool for packaging Python scripts. Use the "freeze.py" tool included with the Python interpreter to package programs for distribution to Linux and Unix platforms that may not have Python installed.

Things You'll Need
  • The Python programming packages compiled from source code and installed on a Linux or Unix computer
  • Path to the Python program script you wish to package

Instructions

    • 1

      Open a command line terminal on a Linux or Unix computer that have the Python programming packages compiled and installed. Type "find / -name freeze.py" and press the "Enter" key. Note the path to the "freeze.py" file in the command line output.

    • 2

      Enter "cd /path_to_file/" at the command prompt, replacing "/path_to_file/" with the exact path where the Python program script you wish to package is located. Press the "Enter" key.

    • 3

      Type "python /path_to_freeze/freeze.py program.py" at the command line, replacing "path_to_freeze" with the exact path to the freeze.py file and replacing the "program.py" with the name of the Python program script you wish to package. Press the "Enter" key.

    • 4

      Enter "make" at the command prompt once the output of the previous command has completed and tap the "Enter" key.

http://www.ehow.com/how_8775144_package-python-scripts.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值