Analysis of Python source code

Source: Internet
Author: User

Python is a commonly used computer language in computer languages and has been widely accepted and used. There are also some related books about Python. But do you have any knowledge about the application solutions related to Python source code analysis? If you have a better understanding, you can click the following article.

Python is a dynamic scripting language. I will not introduce it much. The source code link is here: After Python 2.5 is downloaded, decompress it directly and you can see the following directory structure:

  1. Demo code, mainly used to demonstrate some Python applications
  2. Doc Python UserManual. Latex format
  3. Grammar syntax file. This syntax file will be run in Python
    Used to analyze Python source code
  4. Include header files for Python Include
  5. Library file of Lib Python
  6. Mac For Mac
  7. If Misc is literal, put some files that are not suitable for other places here.
    • Advantages of the Python Programming Language
    • How to efficiently complete the work in the Python Library
    • Use the Python programming language design philosophy to solve the disadvantages of Programming
    • Steps for organizing Python source code
    • It is easy to install Python.
  8. Implementation of some Built-in Modules Python
  9. Implementation of basic internal Objects of Objects Python, such as class/list
  10. Parser Python lexical analysis and syntax analysis
  11. The old Windows and OS2 Port projects and ports in the PC are used
    Some public files are put here, and the contents of this directory must be used in both PCBuild and PCBuild8.
  12. PCBuild Python for VS 2003 Project files
  13. PCbuild8 Python is used for VS 2005 Project files
  14. Python main program code
  15. RISCOS Python-based Proteus OS Port

Tools Required by Tools Build and Extend Python in Python source code analysis

In Unix/Linux/Cywin, you can directly type:

 
 
  1. ./configure  
  2. make install 

If you use VC Build for Windows, you can directly open the corresponding Solution under PCBuild/PCBuild8 to Build. If you Build directly, there will be a lot of errors, and some adjustments are necessary: not all projects can be built immediately, some projects are dependent on third-party libraries, generally, you can skip building these projects directly, but only Build the core Python code. You can use Exclude in Configuration Manager. The required Project is:

 
 
  1. make_buildinfo, make_versioninfo, python,
     pythoncore  

One PythoncoreProject file is missing. You need to manually set Modules \ _ typesmodule. c is added to the project, and the Build will be written here today. In the next article, I will introduce the Python execution process by tracking and executing the simplest Python code. The above content is related to the Python source code analysis.

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.