1-understand Python, 1-Python

Source: Internet
Author: User
Tags processing text

1-understand Python, 1-Python

Why python?:

  • Software Quality:

Read/write, consistency, and software quality
Support for advanced reuse of software development

  • Efficiency provided by developers:

The code is only 1/5 ~ of java or C ++ ~ 1/3
No need to compile links, improving the efficiency of the original program

  • Program Portability:

User image interface, database access, Web-based system, etc.

  • Standard library support:
  • Component Integration:

You can call C or C ++ libraries.
Can be called by C and C ++ programs
Integration with Java components

 

Software Quality:

Concise and highly readable syntax
Minimalistic Design Philosophy: Although there are usually many ways to implement a programming task, there is often only one method that is obvious
Python uses modular design, OPP, and other tools to prompt the reusability of the program.

 

Development efficiency:
Python pays less effort to complete more tasks
Concise syntax, dynamic type, no need to compile, built-in Toolkit

 

Is Python a "script language:
Python is a multi-purpose programming language and often plays the role of a scripting language.
Python can be defined as an object-oriented scripting language.
People often use scripts instead of programs to describe python code files.
"Scripts" tend to describe simple top-level code files.
Programs are used to describe the more complex files.

Python has three different roles:

  • Shell tool:

Implement tasks such as processing text files and calling other programs
Python is not just a good Shell scripting language

  • Control statement:

When testing a hardware device, the application can call the python code without distributing or re-compiling the entire system code.

  • Quick use:

Python's ease of use and flexibility simplify programming tasks
It is often used for fast job tasks and long-term strategic development.

 

What are the disadvantages of Python:
Python does not compile the code into the underlying binary code, and the Python program will be slower than a fully compiled language like C.
The benefits of Python development speed are often more important than the loss of execution speed, while modern CPU is getting faster and faster

 

What can I do with Python:

  • System Programming:

Python's built-in interfaces for operating system services make it an ideal tool for compiling portable management tools and components (Shell tools) for maintaining the Operating System
Python programs can search for files and directory trees, run other programs, and perform Parallel Processing Using processes or threads.
The Python standard library is bound with POSIX and other conventional Operating System (OS) tools: environment variables, files, sockets, pipelines, processes, multithreading, regular expression pattern matching, command line parameters, standard stream interfaces, Shell command starters, file name extensions, etc.

  • User image interface:

Python has built-in TKinter's standard object-oriented interface Tk gui api, allowing Python programs to generate a portable local GUI

  • Internet script:

Python provides a standard Internet module that can play a wide role in a variety of network tasks
Scripts can communicate through sockets, transfer files through FTP, obtain webpages through URLs, and communicate via XML-RPC, SOAP, and Telnet.

  • Component Integration:

Python can be expanded through the C/C ++ system and nested with the features of the C/C ++ System
Embed Python into the product. You can customize the product without re-compiling the entire product or distributing the source code.

  • Database programming:

Python provides interfaces for all mainstream relational databases

  • Quick prototyping:

Components written in Python or C look the same. You can use Python as a system prototype at the beginning, and then port the component to a compilation language such as C or C ++. After the prototype is determined, Python does not need to be rewritten.

  • Numerical computing and scientific computing programming:

Python provides interfaces for Matrix objects and standard math Libraries

  • Games, images, AI, XML, robots, etc.

Use pygame system to program graphics games using Python
Use PsSerial extension for interface communication on Windows, Linux, and more systems
Use PIL, PyOpenGL, Blender, Maya, and other tools for image processing
Xml parsing using XML library, xmlrpclib module, and some other third-party extensions
......

Python has the following technical advantages:

  • Object-oriented:

Python is an object-oriented language that supports advanced concepts such as polymorphism, Operator overloading, and multi-inheritance.

  • Free:

The use and distribution of Python are completely free of charge.

  • Portability:

The standard implementation of Python is written by the portable ansi c.
Python can run on the following platforms:
Linux and UNIX, Windows and DOS, Mac OS, BeOS, etc.

  • Powerful functions:

Python is a mixture of rich tools that make it between traditional scripting languages (Tcl, Perl) and system languages (C, C ++ ).

    • Dynamic Link:

Python tracks the types of objects at any time during running, and does not need to declare complex types and sizes in the code.

    • Automatic Memory Management:

Python automatically allocates objects. When the objects are no longer in use, the objects are automatically revoked ("Garbage Collection ")

    • Large program support:

To build a larger system, Python contains modules, classes, and exception handling tools.

    • Built-in object type:

Python provides common data structures as basic components of the language, such as list, dictionary, and string)

    • Built-in tools:

Python comes with many powerful standard operations, including concatenation, slice, sorting, and mapping)

    • Library tools:

Python provides many pre-compiled library tools, including regular expression matching and network support.

    • Third-party tools:
  • Mixability:

Python C can help Python programs call C Programs flexibly
Python is a combination of library files written in C or C ++ to make Python a front-end language and custom tool.

  • Easy to use:

To run the Python program, simply enter the Python program and run it. You do not need to compile and link any other language.

  • Easy to learn:

The core of the Python language is that it is very easy to learn.

Python eggs:
To understand the complete philosophy of Python, type the import this command in any Python interactive interpreter. Describes a series of Python Design Principles

Python is a project, not an art:
The founder of Python is trained by mathematicians. Python is like mathematics, and its design is also orthogonal (orthogonal). For example, mobile is familiar with Python polymorphism, and the rest is just details.
Writing unique and skillful code is often a strong source of pride among Perl users. Perl is a descriptive language.
Python is the most conducive to the description language of Perl: the Python syntax model forces users to write readable code, and the code can be used for a long time after being written for the first time.

 

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.