Python usage scenarios and application areas

Python Features

  . 1, using the C language development Python, Python but no more complex data type in C language pointer or the like.

  2, Python has a strong object-oriented features, and simplifies the object-oriented implementation. It eliminates the element type of protection, an abstract class, object-oriented interface.

  3, Python code block using mode indented space or tab codes separated.

  4, Python only 31 reserved words, and no semicolon, begin, end the like numerals.

  5, Python is a strongly typed language, will create the variable corresponding to a data type, different types of variables appear in a unified expression of the need to do type conversion.

Python development environment to build

  1, the installation package can be downloaded to www.python.org then installed through configure, make, makeinstall.

  2, can be downloaded to the www.activestate.com ActivePython package assembly. (ActivePython is a binary package for Python and common core module, which is released by ActiveState Python Python development environment .ActivePython makes installation easier and can be applied to a variety of operating systems .ActivePython contains some common Python extensions, and the Windows environment programming interface). For ActivePython, if you are a windows user, download msi package can be installed; if you are a Unix user, download the tar.gz package directly extracted.

  3, Python the IDE, including PythonWin, Eclipse + PyDev plug, Komodo, EditPlus.

Read one article or python main areas of application scenarios

Python applications

  System Programming: Provides API (ApplicationProgrammingInterface application programming interface), to facilitate system maintenance and management, one of the symbolic language of Linux, many system administrators is the ideal programming tool.

  Graphics: There PIL, Tkinter and other graphics library support, can easily handle the graphics.

  Mathematical treatment: NumPy extensions provide numerous interfaces with many of the standard math libraries.

  Text processing: python re module provides regular expression support, it also provides SGML, XML analysis module, many programmers use python XML development program.

  Database programming: programmers can follow PythonDB-API (Application Programming Interface database) in communication with database module specification MicrosoftSQLServer, Oracle, Sybase, DB2, MySQL, SQLite like. Gadfly python comes with a module that provides a complete SQL environment.

  Network Programming: Provides rich module supports sockets programming, can quickly and easily develop distributed applications. Many large-scale software development plan such as Zope, Mnet and BitTorrent.Google are in widespread use it.

  Web programming: application development language that supports the latest XML technology.

  Multimedia applications: Python PyOpenGL the module encapsulates "the OpenGL Application Programming Interface", capable of processing two-dimensional and three-dimensional image. PyGame module can be used to write game software.

  pymo engine: PYMO full name pythonmemoriesoff, is a run on SymbianS60V3, AVG game engine on Symbian3, S60V5, Symbian3, Android system. Because AVG python2.0-based game platform development, and for creating Memories (memoriesoff) style, so named for PYMO.

  Hackers programming: python there is a hack of the library, built your familiar or unfamiliar function, but the lack of a sense of accomplishment.

  Write a simple crawler in Python

  Through the above three this can be the source URL of the content variable exists, it is the type of character.

  Next is from this pile HTML source code to extract what we need. Chrome look with the contents of the code of the corresponding (you can also use Firefox's Firebug).

  Url can see the tag information stored in the span, where information may be acquired by regular expression.

Read one article or python main areas of application scenarios

Python application scenarios

  Web Application Development

  Python经常被用于Web开发。比如,通过mod_wsgi模块,Apache可以运行用Python编写的Web程序。Python定义了WSGI标准应用接口来协调Http服务器与基于Python的Web程序之间的通信。一些Web框架,如Django,TurboGears,web2py,Zope等,可以让程序员轻松地开发和管理复杂的Web程序。

  操作系统管理、服务器运维的自动化脚本

  在很多操作系统里,Python是标准的系统组件。大多数Linux发行版以及NetBSD、OpenBSD和MacOSX都集成了Python,可以在终端下直接运行Python。有一些Linux发行版的安装器使用Python语言编写,比如Ubuntu的Ubiquity安装器,RedHatLinux和Fedora的Anaconda安装器。GentooLinux使用Python来编写它的Portage包管理系统。Python标准库包含了多个调用操作系统功能的库。通过pywin32这个第三方软件包,Python能够访问Windows的COM服务及其它WindowsAPI。使用IronPython,Python程序能够直接调用.NetFramework。一般说来,Python编写的系统管理脚本在可读性、性能、代码重用度、扩展性几方面都优于普通的shell脚本。

  科学计算

  NumPy,SciPy,Matplotlib可以让Python程序员编写科学计算程序。

  桌面软件

  PyQt、PySide、wxPython、PyGTK是Python快速开发桌面应用程序的利器。

  服务器软件(网络软件)

  Python对于各种网络协议的支持很完善,因此经常被用于编写服务器软件、网络爬虫。第三方库Twisted支持异步网络编程和多数标准的网络协议(包含客户端和服务器),并且提供了多种工具,被广泛用于编写高性能的服务器软件。

  游戏

  很多游戏使用C++编写图形显示等高性能模块,而使用Python或者Lua编写游戏的逻辑、服务器。相较于Python,Lua的功能更简单、体积更小;而Python则支持更多的特性和数据类型。

  构思实现,产品早期原型和迭代

  YouTube、Google、Yahoo!、NASA都在内部大量地使用Python。

Python的应用方向

  1.常规软件开发

  Python支持函数式编程和OOP面向对象编程,能够承担任何种类软件的开发工作,因此常规的软件开发、脚本编写、网络编程等都属于标配能力。

  2.科学计算

  随着NumPy,SciPy,Matplotlib,Enthoughtlibrarys等众多程序库的开发,Python越来越适合于做科学计算、绘制高质量的2D和3D图像。和科学计算领域最流行的商业软件Matlab相比,Python是一门通用的程序设计语言,比Matlab所采用的脚本语言的应用范围更广泛,有更多的程序库的支持。虽然Matlab中的许多高级功能和toolbox目前还是无法替代的,不过在日常的科研开发之中仍然有很多的工作是可以用Python代劳的。

  3.自动化运维

  这几乎是Python应用的自留地,作为运维工程师首选的编程语言,Python在自动化运维方面已经深入人心,比如Saltstack和Ansible都是大名鼎鼎的自动化平台。

  4.云计算

  开源云计算解决方案OpenStack就是基于Python开发的,搞云计算的同学都懂的。

  5.WEB开发

  基于Python的Web开发框架不要太多,比如耳熟能详的Django,还有Tornado,Flask。其中的Python+Django架构,应用范围非常广,开发速度非常快,学习门槛也很低,能够帮助你快速的搭建起可用的WEB服务。

  6.网络爬虫

  Also known as web spider, it is a core tool to obtain data of large data industry. No Web crawler automatically, day and night, intelligent crawling take free data on the Internet, companies large data relating to three-quarters less afraid. Web crawlers can write a lot of programming languages, but Python is definitely one of them mainstream, it Scripy reptiles framework is widely used.

  7. Data Analysis

  In large amounts of data, based on the combination of scientific computing, machine learning techniques, data cleansing, de-duplication, and targeted analysis of large data normalization is the cornerstone of the industry. Python is one of the main language for data analysis.

  8. Artificial Intelligence

  Python aspects of machine learning in the field of large category of artificial intelligence, neural networks, deep learning are all mainstream programming language, widely supported and applications.

Guess you like

Origin www.cnblogs.com/sdream/p/11962484.html