Python Program Extension differences

Source: Internet
Author: User

Source: http://blog.csdn.net/chroming/article/details/52083387

1. py

The script file is the most basic source code extension. A direct double-click Run under Windows invokes Python.exe execution.

2, PYc

When you execute Python code, you will often see an pyc file with the same name automatically generated in the same directory. This is the Python source code after the compiled bytecode, generally in the code execution, automatically generate the referenced py file PYc

File. This file can be executed directly, open with a text editor and cannot see the source code.

3, Pyw

is another extension, the only difference with the PY is that under Windows double-clicking the pyw extension of the source code will call Pythonw.exe execute the source code, this way of execution will not have a command line window.

It is mainly used when the GUI program publishes without needing to see the console information.

4, PYO

Optimized encoded file similar to PYC.

5, PYD

This is not generated from a Python program, but an extension written in other languages that can be called by Python. Sometimes dependencies on other DLL files can be import.

Python Program Extension differences

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.