Python Development Introduction

Source: Internet
Author: User

First, the main application areas of Python

(1) Cloud computing

(2) Web development

(3) Scientific calculation, artificial intelligence

(4) System operation and maintenance

(5) Financial

(6) Graphical GUI

II. application of Python in some companies

(1) Google

(2) CIA

(3) NASA

(4) YouTube

(5) Dropbox

(6) Instagram

(7) Facebook

(8) Redhat

(9) Watercress

(10) Know

(11) Rain Doctor

(12) Wait.

Third, Python

Python dynamic language, strongly typed language

(a) advantages

(1) Python's positioning is "elegant", "clear", "simple", so the Python program looks always easy to understand, beginners learn python, not only easy to get started, and in the future, can write those very very complex programs.

(2) The development efficiency is very high, Python has a very powerful third-party library, basically you want to realize any function through the computer, the Python official library has the corresponding module to support, directly download the call, on the basis of the base library to develop again, greatly reduce the development cycle, to avoid repeating the wheel.

(3) High-level language-when you write a program in the Python language, you don't have to consider the underlying details such as how to manage the memory used by your program

(4) Portability-because of its open source nature, Python has been ported to many platforms (modified to enable it to work on different platforms). If you are careful to avoid using system-dependent features, all your Python programs can run on almost any system platform on the market without modification

(5) Extensibility-If you need a piece of your critical code to run faster or if you want some algorithms to be private, you can write some of your programs in C or C + + and then use them in your Python program.

(6) embeddable--You can embed python in your C + + program to provide scripting capabilities to your program users.

(ii) Disadvantages:

(1) Slow, Python running speed compared to the C language is really much slower, and slower than Java, so this is also a lot of so-called Daniel disdain to use Python's main reason, but in fact, this refers to the speed of slow in most cases the user is not directly aware of, must rely on the test workers With the ability to reflect, such as you use C a program to spend 0.01s, Python is 0.1s, so c directly than Python 10 times times faster, is very exaggerated, but you can not directly perceive through the naked eye, Because a normal person can perceive the smallest unit of time is 0.15-0.4s around, haha. In fact, in most cases python has been fully able to meet your requirements for the speed of the program, unless you want to write to the speed of the most demanding search engine, in this case, of course, it is recommended that you use C to achieve.

(2) The code can not be encrypted, because Python is an explanatory language, its source code is stored in the form of a name, but I do not think this is a disadvantage, if your project requires that the source codes must be encrypted, then you should not use Python in the beginning to implement.

(3) Threads do not take advantage of multi-CPU problems, which is the most common disadvantage of Python, Gil is the global interpreter lock (interpreter lock), is the computer programming language interpreter used to synchronize threads of the tool, so that at any moment only one thread in the execution, The python thread is the native thread of the operating system. On Linux for Pthread, on Windows for win thread, the execution of threads is fully dispatched by the operating system. A Python interpreter process has a main thread and the execution thread for multiple user programs. Multi-threaded parallel execution is prohibited even on multicore CPU platforms due to the existence of the Gil. A compromise solution to this problem is discussed in more detail later in the Threads and Processes section.

(c) Python interpreter

(1) CPython

When we downloaded and installed Python 2.7 from the official Python website, we immediately got an official version of the interpreter: CPython. This interpreter was developed in C language, so called CPython. Running Python at the command line is the start of the CPython interpreter.

CPython is the most widely used Python interpreter. All the code for the tutorial is also executed under CPython.

(2) IPython

Ipython is an interactive interpreter based on CPython, meaning that Ipython is only enhanced interactively, but the functionality and CPython of executing Python code are exactly the same. Like many domestic browsers although the appearance of different, but the kernel is actually called ie.

CPython uses >>> as a prompt, while Ipython uses in [ordinal]: as a prompt.

(3) PyPy

PyPy is another Python interpreter whose goal is to perform speed. PyPy uses JIT technology to dynamically compile Python code (note that it is not interpreted), so it can significantly improve the execution speed of Python code.

Most python code can run under PyPy, but PyPy and CPython are somewhat different, which results in the same Python code being executed under both interpreters. If your code is to be executed under PyPy, you need to understand the differences between PyPy and CPython.

(4) Jython

Jython is a Python interpreter running on the Java platform that compiles python code directly to Java bytecode execution.

(5) IronPython

IronPython is similar to Jython, except that IronPython is a Python interpreter running on the Microsoft. NET platform that compiles python code directly into. NET bytecode.

Python has a lot of interpreters, but the most widely used is cpython. If you want to interact with the Java or. NET platform, the best approach is not to use Jython or IronPython, but to interact via network tuning to ensure the independence of each program.

PS: Part of the content from "Golden Horn King and other Tang's Day" essay

Python Development Introduction

Related Article

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.