Learning Python (a) Introduction

Features of Python


A 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.


Second, learn


As you will see, Python is extremely easy to use. As already mentioned, Python has an extraordinarily simple syntax. Free, open-source Python is one of LOSS (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.

Third, 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.


Fourth, portability


Because of 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!


Fifth, interpretative


This 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.


Six, object-oriented


Python is to support process-oriented programming also supports object-oriented programming. In the process-oriented language, the program is constructed by a process or merely a function of reusable code together. In object-oriented languages, an object program is obtained by a combination of data and functionality of 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.


Seven 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.


Eight, Embeddability


You can embed Python within your C / C ++ program, which provides scripting capability to your program's users.


Nine, 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.

Guess you like

Origin blog.csdn.net/haozi87/article/details/93760645