In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to parse Python source code organization related operations, the quality of the article content is high, so Xiaobian share for everyone to make a reference, I hope you have a certain understanding of related knowledge after reading this article.
Python source code organization
To analyze Python source code, of course, you must first obtain Python source code. The current Python *** version is 2.4.2. In this book, I use Python 2.4.1:
After downloading the Python source code package and extracting it, Include: This directory contains all the header files provided by Python. If users need to write custom modules to extend Python in C or C++, they need to use the header files provided here.
Out of the command line window with Python GUI program "Forbidden"
Python in Zope Software Development
Python programming language features advantages embodied
A detailed introduction to how Python libraries do their job efficiently
Using Python programming language design concepts to solve programming problems
Lib: This directory contains all the standard libraries that come with Python. The libraries in Lib are written in Python.
Modules: This folder contains all modules written in C, such as ramdom, cStringIO, etc. Modules are those modules that are very strict about speed. Some modules that are not too strict about speed, such as os, are written in Python and placed in the Lib directory.
Parser: The Parser directory contains the Scanner and Parser sections of the Python interpreter, the sections that perform lexical analysis and syntax analysis of Python source code. In addition to these, the Parser directory contains useful tools that automatically generate Python lexicons and parsers from Python syntax, much like YACC.
Objects: This directory contains all Python's built-in objects, including integers, lists, edicts, etc.; it also includes all Python's internal object implementations needed at runtime.
Python: This directory contains the Compiler and Execution Engine sections of the Python interpreter, which are the core of Python operations.
PCBuild: Contains Visual Studio 2003 project files, and Python source code research starts here.
Compile Python
Well, after downloading the Python source code, we can go out of the *** step of parsing Python source code--compile Python--:)
Python 2.4.1 is developed in Visual Studio 2003 environment. You can see the project files of VS2003 under PCBuild directory. After opening the project, you still need to make some settings to compile successfully.
First, we need to activate the VS2003 configuration dialog:
In the configuration dialog, the first thing to do is to change Startup Project, the default setting in Python 2.4.1 is_bsddb, we need to change it to Python.
About how to parse Python source code organization related operations to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.