Considerations for learning Python programs

Source: Internet
Author: User

The following describes the performance of the Python program and the powerful interpreted programming language. It has a concise and clear syntax and an efficient high-level data structure, which can be used to implement Object-Oriented Programming simply and effectively, it is especially suitable for fast application development and can also be used to develop large-scale important commercial applications.

Python has all the powerful functions of modern programming languages. The Python standard library is very large and can help developers deal with various tasks, such: 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 provide scripting interfaces for applications, 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 .) 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. Learning the powerful functions of the Python program is sufficient, but some specific functions of the operating system need to be implemented in C ++ and 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.

Python has the most abundant and powerful class libraries in the scripting language and is sufficient to support most daily applications. Its name comes from a comedy. Perhaps those who initially designed the Language Python did not expect that today Python will be widely used in industry and scientific research.

Eric Raymond, a famous free software author, listed learning Python programs as one of the four programming languages that hackers should learn in his article "How To Be a hacker, we recommend that you start learning programming from Python. This is indeed a pertinent suggestion. Python is one of the best choices for programming learners who have never learned programming or are not computer professional.

  1. How to embed Python into C ++ applications?
  2. In-depth discussion of Ruby and Python syntax comparison
  3. Introduction to Python
  4. Python Learning Experience: version, IDE selection and encoding solution
  5. Analysis of Python GIL and thread security

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.