python basis --- Hello python, first met.

**

A: python birth

**
Here Insert Picture Description
Python founder: Guido * Fanluosumu

When it comes to Python, it is the birth of the great drama of severe soap opera lovers Guido (turtle t) to pass the boring Christmas, has developed a new script interpreter, which is the legendary Python Birth. The reason for selection as the name of the Python programming language, because a man named Guido is a big fan of Monty Python theater groups.
Here Insert Picture Description
Moreover, from the father of Java, the father of C ++, PHP's father, the father of C of these photos, it is easy to see, hair density championship was undoubtedly the father of Python. So, learn python, hair will be more Oh!
Here Insert Picture Description
Python syntax is simple and clear, for starters regulate their own learning a great help, often as a child introductory programming language, can be described as young and old in a foreign country Python.

Python is a turtle t during Christmas 1989, in order to fill the empty Christmas and written in the C programming language
Python was born in 1991
Python interpreter now have more language, we often are CPython (the official version the C language), there are other Jython (Java can run on the platform), IronPython (.NET and Mono can be run on the platform), PyPy (Python, support for real-time JIT compiler)
Python there are two versions, Python2 and python3.

**

Two: python several major features

**
1, simple
Python is a language represents the simple ideology. Reading a good Python program feels almost like reading English, even though the English very strict! This pseudo-code nature of Python is one of its biggest advantages. It allows you to focus on solving the problem rather than the language itself.
2, easy to learn and
just as you will see, Python is extremely easy to use. As already mentioned, Python has an extraordinarily simple syntax.
3, free, open-source
Python is one of FLOSS (free / open source software). Simply put, you can freely distribute copies of this software, read its source code, make changes to it, it's part of the new free software. FLOSS is based on the concept of sharing knowledge of a group. This is one reason why the Python is so good - it is a group would like to see a better Python has been created and is constantly improved.
4, high-level language
When you write programs in Python, you do not need low-level details such as managing the memory of a class of your program uses.
5, portability
due to its open-source nature, Python has been ported on many platforms (changed to make it work on different platforms). If you are careful to avoid any system-dependent features, then all your Python programs can be run without modification on any of these 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 and even PocketPC, Symbian and Google Android-based linux development platform!
6, explanatory
that requires some explanation. For example, a C or C ++ programs written in compiled language can be converted from the source file (ie C or C ++) to the language (binary code ie 0 and 1) a computer you use. This process by the compiler and various flags and options. When you run your program, the linker / loader software to copy your program from the hard disk into memory and run. Python, the program does not need to be compiled into binary code. You can run the program directly from the source code.
Inside the computer, Python interpreter converts the source code into an intermediate form called bytecode, then translates it into a machine language using the computer and run. In fact, because you no longer need to worry about compiling the program, making sure the proper libraries are linked and loaded, all of which makes using Python much easier. Since you can just copy your Python program onto another computer and it just works, and this also makes your Python programs more portable.
7, object-oriented
Python supports both process-oriented programming also supports object-oriented programming. In the "procedure-oriented" language, it is constructed from a program or process is simply a function of reusable code together. In the "object-oriented" language, the object program is a combination of data and functionality from the build up. And Java in comparison with other major languages such as C ++, Python has a very powerful but simplistic way of object-oriented programming.
Scalability
8, scalability,
if you need a critical piece of code to run very fast or want some algorithms are not open, you can put part of your program in C or C ++, and then use them in your Python programs .
9, a rich library
Python Standard Library is huge indeed. It can help you deal with all kinds of work, including regular expressions, documentation generation, unit testing, threading, databases, web browsers, CGI, FTP, email, XML, XML-RPC, HTML , WAV files, cryptography, GUI (graphical user interface), Tk, and other system-related operations.
Remember, as long as the installation of Python, all of these features are available. This is called Python's "fully functional" concept. In addition to the standard library, there are many other high-quality libraries such as wxPython, Twisted, Python Imaging Library and so on.

python can do? (Scenarios)

1, Web application development
Python is often used in Web development. For example, through mod_wsgi module, Apache can run Web applications written in Python.
Python WSGI standard defines the application interface communicates with the server to coordinate Http Python between a Web-based program.
Some Web frameworks such as Django, TurboGears, web2py, Zope and so on, allowing programmers to easily develop and manage complex Web programs.
2, operating system management, server operation and maintenance of automation scripts
in many operating systems, Python is a standard system components. Most Linux distributions and NetBSD, OpenBSD and Mac OS X are integrated Python, Python can be run directly in the terminal.
Some Linux distributions install using Python language, such as Ubuntu's Ubiquity installer, Red Hat Linux and Fedora's Anaconda installer. Gentoo Linux using Python to write its Portage package management systems.
Python standard library contains multiple calls to the operating system function library. Pywin32 through this third-party packages, Python can access the Windows COM services and other Windows API. Use IronPython, Python programs can directly call .Net Framework.
In general, system administration scripting in Python readability, performance, degree of code reuse, scalability aspects are better than regular shell script.
3, scientific computing
NumPy, SciPy, Matplotlib allows Python programmers to write scientific computing program.
4, desktop software
PyQt, PySide, wxPython, PyGTK Python is fast desktop application development tool.
5, server software (network software)
Python support for various network protocols is perfect, it is often used for writing server software, web crawler.
Twisted third-party library support asynchronous network programming and most standard network protocol (including client and server), and provides a variety of tools that are widely used in the preparation of high-performance server software.
6, the game
many games written in C ++ and other high-performance graphics display module, the logical preparation of the game or the Lua Python, the server.
Compared to the Python, the Lua features a simpler, smaller; and Python supports more features and data types.

**

Why study pthon?

**
with the same problem to solve in different languages, the amount of the gap is still a lot of code, under normal circumstances Python Java is 1/5, so that life is short, I used Python.
Then look at the data TIOBE official website of the following:
Here Insert Picture Description
Here Insert Picture Description
**

So: Python together to explore the wonders of it!

**

Published 17 original articles · won praise 21 · views 40000 +

Guess you like

Origin blog.csdn.net/hou1620089770/article/details/105277492