The Python standard library is very large, and there are also some high-quality libraries, such as wXPython, Python, and other graphics libraries. If you want to know something about the Python standard library, you can understand it through the following articles.
Python is a simple, easy-to-learn and powerful interpreted programming language. It has simple and clear syntax and an efficient high-level data structure, allowing you to easily and effectively implement object-oriented programming, it is especially suitable for fast application development and can also be used to develop large-scale important commercial applications. Python is an ideal scripting language.
- Introduce the member attributes of the class embedded in Python in C ++
- To embed Python into the C ++ operator, perform the following operations:
- The built-in code generator of Boost. Python is Pyste.
- Which libraries should be linked when Python is embedded in c?
- Python scripts and C ++ programs call each other
Python is free and open-source, and can be transplanted to multiple operating systems. As long as you do not need to use features dependent on specific operating systems, Python programs can run on various platforms without modification. Python has all the powerful functions of modern programming languages,
The Python standard library is very large and can help developers handle various tasks,
For example: graphical user interface, file processing, multimedia, regular expressions, document generation, unit testing, thread, database, network communication, web browser, CGI, FTP, email, XML, HTML, WAV file, password system, Tk, and other system-related operations.
As long as Python is installed, these functions are available in addition to the standard library, there are many other high-quality libraries, such as wXPython, Twisted, and Python graphics libraries.
Python is easy to expand and embed. Many standard modules provided by Python support C or C ++ interfaces. Python and C can work together and can be embedded into C or C ++ applications. Therefore, the Python language can be used to provide a script interface for the application. Because it supports cross-language development, you can use Python to design a conceptual application and gradually port it to C. You do not have to use C to rewrite the application.
(Jython enables Python to work with Java, so that developers can call Java packages in Python or use Python objects in Java. Even better, because the Jython interpreter is fully written in Java, you can deploy Python programs on any platform that supports Java, and even run Python scripts on WEB browsers .)
Raise Questions
In a C ++ application, we use a set of plug-ins to implement functions with unified interfaces. We use Python to replace the plug-ins in the form of dynamic link libraries, in this way, you can easily rewrite the script code as needed, rather than re-compile the dynamic link library of the link binary. The powerful functions of Python are sufficient, but some specific functions of the operating system need to be implemented using C ++, which is then called by Python. Therefore, we need:
1. Embed Python into the C ++ application, call the Python function in the C ++ program, and obtain the value of the variable;
2. Compile the extension module (Dynamic Link Library) for Python using C ++, and call the extension function developed by C ++ In the Python program.
The above is an introduction to the features of the Python standard library that can help developers deal with various work-related content. I hope you will gain some benefits.