Head Frist Python Reading notes build release

Source: Internet
Author: User
Tags python script

Build Release p41

Windows systems need to be executed using "C:\pythonX\python.exe",

Or, you can simplify the input by configuring environment variables

1. First, you need to register the Python environment variable in the system: assuming that the Python installation path is c:\python2.6, modify the path in the system variable, advanced environment variable, properties----"

(in order to run the Python command in command-line mode, you need to append the directory where the Python.exe resides to the environment variable of path.) )

Path=path;c:\python26

Once the above environment variable is set up successfully, you can use the Python command directly at the command line. or execute "python *.py" to run the Python script.

2. At this point, you can still run Python scripts only through Python *.py, and if you want to run *.py directly, simply modify the other environment variable Pathext:

Pathext=pathext;. PY;. PYM

Command Description:

Python setup.py sdist

(Assuming haven ' t specified any sdist options in the setup Script or config file), sdist creates the Archive of the default format for the current platform. The default format is a gzip "Ed tar file (. tar.gz) on Unix, and ZIP file on Windows.

You can specify as many formats as if using the --formats option, for example:

Python setup.py sdist--formats=gztar,zip

To create a gzipped tarball and a zip file. The available formats is:

Format Description Notes
Zip Zip file (. zip) (1), (3)
Gztar Gzip ' Ed tar file (. tar.gz) (2)
Bztar Bzip2 ' Ed tar file (. tar.bz2)
Ztar Compressed tar file (. Tar. Z) (4)
Tar Tar file (. Tar)

Notes:

    1. Default on Windows
    2. Default on Unix
    3. Requires either external zip utility or zipfile module (part of the standard Python library since Python 1.6)
    4. Requires the Compress program. Notice the This format is now pending for deprecation and'll be removed in the future versions of Python.

When using the any tar format (gztar, bztar, ztar or tar), under Unix can SPE Cify the owner and group names that'll be set to each member of the archive.

For example, if you want any files of the archive to is owned by Root:

Python setup.py sdist--owner=root--group=root

Tips: "Open a terminal window", you can use the command line CD to the directory of the code, you can also shift+ the right mouse button in the directory, bring up the command window

Head Frist Python Reading notes build release

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.