Getting started with Python + advanced 1th python primer (whenever, as long as it's not too late)

Source: Internet
Author: User
Tags lua

1. Beginner's Guide to Python 1.1 Python concept

Python (United Kingdom pronunciation:/?pa?θ?n/American pronunciation:/?pa?θɑ?n/) is a high-level scripting language that combines explanatory, compiled, interactive, and object-oriented.

Python's design is highly readable, with English keywords often used in other languages, some punctuation in other languages, and it has a more distinctive grammatical structure than other languages.

Python is an interpreted language: This means that the development process has not been compiled this link. Similar to the PHP and Perl languages.

Python is an interactive language: This means that you can execute your program in a Python prompt directly interacting with the execution.

Python is an object-oriented language: This means that Python supports object-oriented styles or code encapsulation in object programming techniques.

Python is the language of beginners: Python is a great language for novice programmers, and it supports a wide range of application development, from simple word processing to WWW browser to gaming.

1.2 python features

1. Easy to learn: Python has a relatively small number of keywords, simple structure, and a well-defined syntax that is easier to learn.

2. Easy to read: The Python code is defined more clearly.

3. Easy maintenance: The success of Python is that its source code is fairly easy to maintain.

4. A broad library of standards: One of the biggest advantages of Python is the rich library, cross-platform, compatible with Unix,windows and Macintosh very well.

5. Interactive mode: interactive mode of support, you can enter the execution code from the terminal and obtain the results of the language, interactive testing and debugging code snippets.

6. Portable: based on its open source features, Python has been ported (that is, making it work) to many platforms.

7. Extensible: If you need a critical code that runs fast, or if you want to write some algorithms that you don't like to open, you can use C or C + + to complete that part of the program and then call it from your Python program.

8. Database: Python provides the interface for all major business databases.

9.GUI Programming: Python support GUI can be created and ported to many system calls.

10. Embeddable: You can embed python in a C + + program to give your program's users the ability to "script".

1.3 Python Application Scenario 1.3.1 Web Program Development

  Python is often used for web development. For example, with the Mod_wsgi module, Apache can run web programs written in Python. Gunicorn, written in the Python language, is also capable of running web programs written in the Python language as a Web server. Python defines the WSGI (Web server Gateway Interface) standard application interface to coordinate the communication between the HTTP server and the Python-based Web program. Some web frameworks, such as Django, Pyramid, TurboGears, Tornado, Web2py, Zope, and flask, can make it easy for programmers to develop and manage complex web programs.

Python's support for various network protocols is perfect and is often used to write server software and network worms. The third-party library twisted supports asynchronous online authoring programs and most standard network protocols (including clients and servers), and provides a variety of tools that are widely used to write high-performance server software. Another gevent, the popular third-party library, is also capable of supporting high-performance, highly concurrent network development.

1.3.2 GUI Development

python itself contains a tkinter library that supports the development of a simple GUI (graphical User Interface). But more and more Python programmers choose GUI packages such as Wxpython or PYQT to develop cross-platform desktop software. Desktop software that is developed with them runs fast and matches the user's desktop environment. You can also publish a program as a standalone installation package through Pyinstaller.

in many operating systems, Python is the standard system component. Most Linux distributions, as well as NetBSD, OpenBSD, and Mac OS X, are integrated with Python, which can be run directly under the terminal. Some installers for Linux distributions are written in Python language, such as Ubuntu's ubiquity installer, Red Hat Linux, and Fedora's Anaconda installer. Gentoo Linux uses Python to write its Portage package management system. The Python standard library contains several libraries that invoke the functionality of the job system. By Pywin32 This third-party package, Python has access to Windows COM services and other Windows APIs. Use the Ironpython,python program to directly invoke the. Net Framework.

1.3.3 Other

  NumPy, SciPy, matplotlib can allow Python programmers to write scientific computing programs. Some companies use scons instead of make to build C + + programs.

Many games use C + + to write high-performance modules such as graphical display, while using Python or Lua to write game logic, servers. Compared to Python,lua, the functionality is simpler and smaller, while Python supports more features and data types. Many games, such as Eve Online, use Python to handle a variety of logic in the game.

YouTube, Google, Yahoo!, and NASA all use Python in their own way. Most of the software for the Sugar project is written using Python.

so Python's scope of application is roughly divided into: data analysis, system Programming, component Integration, Network Services, image processing, numerical calculation and scientific calculation.

Getting started with Python + advanced 1th python primer (whenever, as long as it's not too late)

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.