Home>Article>Backend Development> What software is python?

What software is python?

藏色散人
藏色散人 Original
2021-06-10 15:45:54 28061browse

Python is not software, it is a computer programming language; Python provides efficient high-level data structures, and can also enable simple and effective object-oriented programming; Python syntax and dynamic typing, as well as the nature of interpreted languages, make it It has become the programming language for scripting and rapid application development on most platforms.

What software is python?

The operating environment of this article: windows7 system, Dell G3 computer, python3.6.4.

What software is python?

Python is not a software, it is a computer programming language.

Python was designed by Guido van Rossum of the Dutch Society for Mathematics and Computer Science in the early 1990s as a replacement for a language called ABC. Python provides efficient high-level data structures and enables simple and effective object-oriented programming. Python's syntax and dynamic typing, as well as the nature of an interpreted language, make it a programming language for scripting and rapid application development on most platforms. With the continuous update of the version and the addition of new language features, it is gradually used for independent, large-scale Project development.

The Python interpreter is easily extensible and can be extended with new functions and data types using C or C (or other languages that can be called through C). Python can also be used as an extension programming language in customizable software. Python's rich standard library provides source code or machine code suitable for each major system platform.

Advantages

Simplicity: Python is a language that represents the idea of simplicity. Reading a good Python program feels like reading English. It allows you to focus on solving problems rather than figuring out the language itself.

Easy to learn: Python is extremely easy to get started because Python has extremely simple documentation.

Easy to read and maintain: clear and consistent style, forced indentation

Versatile use

Fast speed: The bottom layer of Python is written in C language, and many standard libraries and Third-party libraries are also written in C and run very fast.

Free and open source: Python is one of FLOSS (Free/Open Source Software). Users are free to distribute copies of this software, read its source code, make changes to it, and use parts of it in new free software. FLOSS is based on the concept of a group sharing knowledge.

High-level language: When writing programs in Python, you don’t need to worry about low-level details such as how to manage the memory used by your program.

Portability: Due to its open source nature, Python has been ported on many platforms (with modifications to enable it to work on different platforms). These platforms include Linux, Windows, FreeBSD, Macintosh, Solaris, OS/2, Amiga, AROS, AS/400, BeOS, OS/390, z/OS, Palm OS, QNX, VMS, Psion, Acom RISC OS, VxWorks, PlayStation, Sharp Zaurus, Windows CE, PocketPC, Symbian and Google's android platform based on Linux.

Interpretability: A program written in a compiled language such as C or C can be converted from a source file (i.e. C or C language) into a language used by your computer (binary code, i.e. 0s and 1s) . This process is done through the compiler and different flags and options.

When you run a program, the linker/reprinter software copies your program from the hard disk to memory and runs it. Programs written in Python do not need to be compiled into binary code. You can run programs directly from source code.

Inside the computer, the Python interpreter converts the source code into an intermediate form called bytecode, which is then translated into the machine language used by the computer and run. This makes using Python much simpler. It also makes Python programs more portable.

Object-oriented: Python supports both procedural and object-oriented programming. In "procedural-oriented" languages, programs are built from procedures, or simply functions that are reusable code. In "object-oriented" languages, programs are built from objects that combine data and functionality.

Python is a completely object-oriented language. Functions, modules, numbers, and strings are all objects. And it fully supports inheritance, overloading, derivation, and multiple inheritance, which is beneficial to enhance the reusability of source code. Python supports overloaded operators and dynamic typing. Compared with Lisp, a traditional functional programming language, Python only provides limited support for functional design. There are two standard libraries (functools, itertools) that provide proven functional programming tools in Haskell and Standard ML.

Scalability, extensibility: If you need a key piece of code to run faster or you want some algorithms not to be made public, you can write part of the program in C or C and then use them in a Python program.

Python itself is designed to be extensible. Not all features and functionality are integrated into the language core. Python provides a wealth of APIs and tools so that programmers can easily use C language, C, and Cython to write expansion modules. The Python compiler itself can also be integrated into other programs that require a scripting language. Therefore, many people also use Python as a "glue language". Use Python to integrate and encapsulate programs written in other languages. Many projects within Google, such as Google Engine, use C to write parts with extremely high performance requirements, and then use Python or Java/Go to call the corresponding modules. Alex Martelli, author of "Python Technical Manual" said: "It's hard to say, but in 2004, Python was already used internally at Google. Google recruited many Python experts, but it had already decided to use Python before that. , their purpose is Python where we can, C where we must, use C when controlling hardware, and use Python during rapid development."

Embeddability: Python can be embedded into C/C programs, This provides scripting capabilities to program users.

Rich library: The Python standard library is indeed huge. It can help with a variety of tasks, including regular expressions, document generation, unit testing, threads, databases, web browsers, CGI, FTP, email, XML, XML-RPC, HTML, WAV files, cryptography, GUI ( Graphical user interface), Tk and other system-related operations. This is called Python's "full-featured" philosophy. In addition to the standard library, there are many other high-quality libraries, such as wxPython, Twisted, and the Python imaging library, among others.

Standardized code: Python uses forced indentation to make the code more readable. Programs written in Python do not need to be compiled into binary code. The author of Python designed a very restrictive syntax so that bad programming habits (such as not indenting the next line to the right in an if statement) cannot be compiled. One of the most important ones is Python's indentation rules. One difference from most other languages (such as C) is that the boundaries of a module are completely determined by the position of the first character of each line in this line (while C language uses a pair of curly braces {} to clearly determine outside the boundaries of the module and has nothing to do with the position of the characters). By forcing programmers to indent (including if, for, and function definitions where modules are used), Python does make programs clearer and more beautiful.

Advanced dynamic programming: Although Python may be roughly classified as a "script language" (script language), it is actually used extensively by some large-scale software development projects such as Zope, Mnet and BitTorrent, and Google also uses it extensively. Supporters of Python prefer to call it a high-level dynamic programming language. The reason is that "scripting language" generally refers to a language that only performs simple programming tasks, such as shellscript, VBScript and other programming languages that can only handle simple tasks and cannot be compared with Python. Python is comparable.

There are many advantages to doing scientific computing: When talking about scientific computing, the first thing that will be mentioned may be MATLAB. Except for some highly professional toolboxes of MATLAB that cannot be replaced, most of the common functions of MATLAB can be found in the corresponding extension libraries in the Python world. Compared with MATLAB, using Python for scientific calculations has the following advantages:

● First of all, MATLAB is a commercial software and is expensive. Python is completely free, and many open source scientific computing libraries provide Python calling interfaces. Users can install Python and most of its extension libraries for free on any computer.

● Secondly, compared with MATLAB, Python is an easier to learn and more rigorous programming language. It allows users to write code that is more readable and maintainable.

● Finally, MATLAB is mainly focused on engineering and scientific computing. However, even in the computing field, various needs such as file management, interface design, and network communication are often encountered. Python has a rich extension library that can easily complete various advanced tasks. Developers can use Python to implement various functions required for complete applications.

Disadvantages

Single-line statements and command line output problems: many times the program cannot be written in one line, such as import sys; for i in sys.path:print i. Perl and awk do not have this restriction. They can easily complete simple programs under the shell. They do not need to write the program into a .py file like Python.

Causes confusion to beginners: The unique syntax may not be called a limitation, but the way it uses indentation to distinguish statement relationships still brings confusion to many beginners. Even experienced Python programmers can fall into traps.

Slow running speed: This refers to compared with C and C. Python developers try to avoid immature or unimportant optimizations. Patches that speed up non-critical parts of the code are usually not incorporated into Python. So many people think Python is slow. However, according to the 80/20 rule, most programs do not have high speed requirements. In some situations where running speed is very high, Python designers tend to use JIT technology, or rewrite this part of the program in C/C language. The available JIT technology is PyPy.

Recommended learning: "python video tutorial"

The above is the detailed content of What software is python?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn