Home > News content

Python everywhere

via:博客园     time:2017/12/27 16:32:11     readed:980

Text / Tong Da

ThoughtWorks senior consultant, deep learning research group technical director. Focus on the deep learning and intelligent system design and development, on artificial intelligence, deep learning, big data architecture, cloud computing, DevOps and other in-depth study.

On February 20, 1991, Guido van Rossum, later known as "merciful dictator," released Python for the first time at a time as an aid to an operating system project called Amoeba, and Python was not even officially Project. No one ever imagined that the Amoeba project ceased development in 1996, and Python evolved over 20 years into one of the most popular programming languages.

orgsrc=//images2017.cnblogs.com/news/66372/201712/66372-20171227152344003-485915182.png(Image from: http: t.cn/RHGUMx6)

The goal of Guido van Rossum in designing Python was to use it to simplify the development of systems management tools. The goal was indeed achieved. Most Linux operating systems and macOS have built-in Python, not to mention the fact that Python, Fabric, Ansible and Saltstack based on Python System management tools. However, simply getting the main business done is never the sole goal of Python. The world is so big, Python is going to have a look.

Dependable Python

When Python is no longer just a system management tool, it's the first step in cross-border development, from Web development to scientific computing, from 3D modeling to artificial intelligence, from embedded development to cloud computing and Big data, in almost every corner, can see the presence of Python.

System management tools

Python was developed from the beginning to improve system management efficiency. Built-inosThe module provides basic and consistent mode of operation when compatible with most major operating systems, and the system administrator's scripts need only be written once to run on different operating systems. With Python's concise and efficient syntax, Python is much more efficient at developing complex system administration tasks than Shell, and at the same time performs far more efficiently than a shell that requires non-stop process switching. In order to use the popular Linux command-line tools, David Beazley used Python to develop a set of commonly used tools for Linux on Windows within a few days.

For complex systems management work, the current configuration management tools such as Fabric, Ansible, Saltstack, etc., can allow operation and maintenance personnel to use a few lines of command, allowing hundreds of servers to bow their heads. As the DevOps movement evolves, the concept of "infrastructure as code" is gaining in popularity. With the help of tools such as molecule or testinfra, developers can run the unit tests and test the configuration of the infrastructure.


Web development

The world's first web site was launched in 1989, and the World Wide Web was invented in 1994. It can be said that Python is growing up with the Internet. Python and Perl, as dynamic languages ​​with a higher level of abstraction, were quickly found by developers to be more suitable for developing Web sites and played an important role in the early Internet's rise.

With the advent of the Internet, many Internet-enabled programming languages ​​have been invented, such as Java, PHP, Ruby, and others, and have surpassed the predecessors of Python and Perl. However, Python still has a place in the world of web development. Such as the famous one-stop web framework Django, lightweight Flask, high performance Tornado and so on. Some well-known websites, but also run with the support of Python technology, such as Youtube, Reddit, Pinterest, Dropbox, watercress and so on.

Scientific Computing

While Web technologies became popular and Java, PHP and other programming languages ​​were raging, Python's attention was not completely focused on the web. Instead, casually put the first-mover advantage aside and turned to scientific computing.

One of the notions of Python at the beginning of the design process was to program as much as possible in English or high school algebra, so although the initial scenario did not consider scientific computing, academia focused on Python. In 1995, a team studying how to enable Python to support efficient matrix operations was founded by Guido van Rossum, the founder of Python, who is also in the team to make Python better able to support matrix operations and to specifically design and modify Some Python syntax. Just this year, Numeric Numerical Library was released. In 2006, Numeric officially changed its name to NumPy.


In the new century, more scientific computing related tools have been developed around NumPy, such as SciPy for scientific computing, SymPy for symbolic computing, Pandas for data analysis, Matplotlib for data visualization, Real-time drawing of the interactive development environment IPython Notebook. After years of leadership in the field of scientific computing, such as Matlab, professional software has won a place in academia for almost 10 years. And when other generic programming languages ​​were killed in the wave of the web and looking back to grab a piece of territory in scientific computing, it was found that things had become much more difficult than in the past.

cloud computing

In the post-internet era, cloud computing and big data were the two most frequently cited concepts. The popularity of the Internet has brought about a drastic reduction in the cost of information production and exchange, which has led to the explosion of information. In order to further reduce costs and release the value of data, cloud computing and big data technology came into being.

Mention cloud computing, I must mention is that OpenStack, has now become the de facto standards for open source private cloud platform. The main reason OpenStack chooses Python primarily as a development language is that Python, as a glue language, interacts well with the operating system and integrates well with tool libraries written in other languages, and that Python itself is robust enough to look and feel like Distributed task management, Web development, etc. can be very good support. By the same token, AWS, the largest public cloud platform with the largest market share, now ships with Python SDK support.

Big Data

The rise of big data technology has given many new technologies the opportunity to show their faces. Languages ​​such as Scala, R, Julia, used to be niche languages ​​but attracted a large number of developers because of their big data strengths. In addition to these niche languages, Java and Python count as two of the most powerful languages ​​in traditional programming.

Python's ineluctability, thanks to its accumulation in the field of scientific computing, such as Pandas and SciPy, these once used in academia tools, also become important in big data processing. Therefore, the big data-processing tools like Spark and H2O are not written in Python at the heart of the big data-processing tools, but they have devoted a lot of effort to developing Python interfaces to meet the needs of tool users. In addition to this, there are few, if any, Python-based tools, such as superset, a data visualization tool developed by Airbnb, and airflow, the task-scheduling tool.



Mentioned in the programmer circle Python, the first reaction is "easy to get started". It is because of the simple, everyone will write a little, if not write, you can understand, so we are not so proud of Python things. Compared to Python, programmers are more willing to show off their relatively sophisticated programming languages, such as Clojure or Haskell.

But simple and easy. Because of its simplicity, Python has become the scripting language of choice for a wide range of simulation software. Such as the famous image processing tools GIMP, 3D modeling tools 3ds Max, Blender, movie effects tools Houdini, Maya, film post-synthesis tools Nuke, etc., are Python as a script.

artificial intelligence

Since AlphaGo defeated Li Shih-tung, artificial intelligence was a mess. However, artificial intelligence is not a new concept, its history has been more than half a century. In the past decades of artificial intelligence in the development of the field, the traditional mainstream programming language is obviously Lisp, while the rising star is also a language like Prolog. But as the wave of artificial intelligence really started to pop, it was found that the popular frameworks and tools were either written in Python, such as Theano, or C ++, but Python was the interface language, such as TensorFlow, Caffe, MxNet and so on. Torch, the only non-Python framework, was unable to resist the pressure in 2017 to develop PyTorch.


Python is one of the best choices in algorithmic trading and quantitative investment.

In the embedded space, the popular programmer toy raspberry pie, choose Python as the main programming interface.

In software development and management, the build tools Scons and trackers Trac although not particularly popular, but also in an active state.

Although Python's main application scenario is on the command line, it does not mean that it can not do desktop software development. With the help of PyQt and Kivy these graphics libraries, Python can also develop beautiful desktop software.

Borrow a catchphrase: Python so powerful, why not heaven?

In fact, NASA is indeed using Python to develop software, primarily for system integration and test automation for satellites, rockets, and more.


Software development of all-metal oil

It seems that Python is not the best programming language in any area, but Python is number one in every field. From the initial system management to the Internet era, cloud computing and big data era, and then to the present artificial intelligence era, only "Python" is in every wave.

In an era of domain segmentation, the language of choice, such as Python, receives less attention in every area than the main language in the field. However, the times are changing. The tide of digitization is accompanied by the east wind of artificial intelligence and Internet of Things. The enterprises have to make changes in order to respond quickly.

Business is not divided between online and offline, only the digitization and digitalization will be divided.

In order to keep pace with changing needs, the original "Analysis - Design - Development - Integration - Test - on the line" This waterfall development process is being compressed. Driven by the agile software development movement, the first is that the boundaries between development and testing are no longer clear. Later, the DevOps campaign was launched and the wall between development and operation and maintenance was broken. Real-time big data architecture and data-driven services emerged, Relatively independent data team, but also to more closely involved in business development.

When all the roles are in the same team, writing code in the same language is very important when writing code for a business goal. At this time, do not fall behind in Python, the advantage is revealed. "Python does not have a place in the business" has a place in a different area, which makes the points belong to different departments, different roles of team members have the opportunity to use Python to harmonize the working language. Whether it's development, testing, operation and maintenance, or data scientist, Python is a good though not the best choice.

Low-cost trial and error the best choice

Once, programming itself is a business; now, programming is just a tool for doing that. In that year, many new languages ​​could be speculated because of a new concept. For example, the emergence of object-oriented technology did not bring any huge innovation to the business of the enterprise, but it started a wave of technology wave. Now, a new technology is being proposed Come out, companies must first consider what business can bring benefits.

New concepts such as artificial intelligence (or new concept of old concepts), for enterprises, their own relatively high threshold, the business benefits are not yet clear, if you have to invest a lot of manpower and money to learn new technologies, For businesses, the risk is very large. However, for innovation, companies can not complacent. Especially as a catch-up or start-up, under the rules prevailing by Internet winners, innovation is even linked to the life and death of an enterprise. Therefore, low-cost trial and error is the key to business success.

Using open source software or cloud services to avoid re-creating wheels can be very effective for businesses to reduce trial and error costs. Because the Python language itself is well-suited as a "glue" language for service integration, many open source and cloud services choose Python as the interface language (Spark, TensorFlow, AWS, etc.). If companies want to use these technologies for innovative experiments, Python is a very good choice.

Who is after Python?

Python's popularity is not a well-designed script from the beginning. Just at a specific time, there are specific requirements for the programming language, and just Python to meet such needs. Python, as a programming language, is no better than other programming languages.

Technology is not the best, only the most suitable.

If you want to predict what programming languages ​​are more prevalent in the future, you have to know what the future needs for programming languages. The current demand for programming languages ​​is to be able to use different roles and to integrate or reuse existing technologies or services. Python, however, is quick to read, readable and interoperable with other languages, just to meet such needs.

If one day in the future, more attention is paid to program execution speed than other requirements, perhaps C or Go will be more popular languages; Elixir, Scala or Clojure may be more demanding if programming abilities are abstracted Will be more popular; if the demand for programmers a higher number, you need to reduce the difficulty of getting started, maybe Java will be popular again; or, the future for programming needs, for all programming languages, there is no way to meet, There will be a new programming language. So, where the future of programming will go depends on what kind of business needs for programming.


Maybe Python has a lot of flaws and is not particularly good in every respect, but it can put all the key technologies in tandem, reduce the cost of introducing new technologies, and make the team members have a common language. Why not?

Pure programming is no longer, play cross-border, Python can, you can?

More exciting insights, please pay attention to WeChat public number:

China IT News APP

Download China IT News APP

Please rate this news

The average score will be displayed after you score.

Post comment

Do not see clearly? Click for a new code.

User comments