[turn]python Common class library!]

Source: Internet
Author: User
Tags gtk html tags image processing library message queue knowledge base rabbitmq web2py


Python Learning


On this page ... (hide)


    1. 1.? Basic Installation
    2. 2.? Python documentation
      1. 2.1. Recommended Resources Site
      2. 2.2? Other references
      3. 2.3? code example
    3. 3.? Common tools
      1. 3.1? Python IDE
      2. 3.2? Built-in class library use reference
      3. 3.3? Common Third-party class libraries
      4. 3.4? Other things
      5. 3.5? Something Interesting.
      6. 3.6? Something common, but probably useful.
(Edit Section↓) 1.? Basic Installation
    • Http://www.python.org/official Standard Python Development kit and support environment, but also the official website of python;
    • Http://www.activestate.com/is a powerful unofficial version that integrates many useful plugins, especially for Windows Environments.
(Edit Section↓) 2.? Python documentation
    • Python Library Reference Manual
    • Python Tutorial Chinese version
    • Byte of Python can be used instead of tutorial, with a Chinese translation of the introductory books.
    • Dive into Python a more comprehensive and easy-to-understand introductory book, the Chinese version of the translation has recently progressed to a very timely 5.4. The English version is being written for the Python 3.x Version.
      • The disadvantage is that the Python version of this book is obsolete and will give some outdated optimization suggestions, and it is recommended to read Rai Yonghao'slarge subsidy at the same time.
      • "deep Python 3" Chinese version
    • Python coding style (chinese translation in the Woodpecker Community) is officially recommended by the Python Community. Related code checking tool, reference: Check python coding style with Pep 8.
      • Python coding style recommended by Google Soc (python coding style guide in translation (google SOC))
        • The Guide to the Google original Python Coding style guide SoC is basically a modification and addition to This.
    • Zoom.quiet documentation set (including A large amount of Python Content)
    • python-related Books recommended on watercress
    • pythonic, What the hell is this thing?
    • Python resource index on the Woodpecker community
    • Training Material:
      • A simple introduction to the class can be consulted: intropy and promoting Python in the company
      • Practical programming ability training can refer to Shen Immortal to his company's internal python training materials: preface, basic, object-oriented, Graphic Interface programming, Network programming
(Edit section↓) 2.1? Recommended Resources site
    • Parnassus Mountain's vaulted huge python code library, all-encompassing. You can download code reference learning from the above, as well as a large list of python-related Programs.
    • The Python star cruise Ship's famous Python community, with its code, documentation, and Tall Man.
    • faqts.com python Programming Knowledge Database Python program design knowledge base, are related to Python programming problems and Solutions.
    • Woodpecker Pythonic Open Source Community famous (and can be said to be the Best) domestic Python open source Community.
    • Rai Yonghao recommended a few fun and difficult programming sites
(Edit Section↓) 2.2? Other references
    • ZDNet Article: Learn the necessary resources for Python language
    • Various useful Code Snippets
    • Python Programming Tips Notes
    • How to get the location of the directory where the Python script resides
    • How to easily register a new class library with the Python environment
    • Performance comparison of several concurrent implementations of Python
    • Pythonic WEB Application Platform Comparison now individuals are interested in web.py (roughly and Karrigell similar to the Python Web application framework, which is similar to Php's) and Web2py. The REPOZE.BFG solution has recently emerged in the Zope community, so it's free to use the right parts of Zope (another development for the Zope community is grok, with the goal of being agile, easy to use and powerful). There are also paste such as WSGI reference implementations to help make their own Framework.
    • Experience in image processing under WxPython (in fact, the use of WxPython can also be done with a lot of comparative basic image processing, in the 12th section of the book "wxPython in Action")
    • Serializing the storage Python object
    • Ways to get a list of system processes using Python through the Win32 extension interface
    • Py2exe problems encountered in the use of
    • Idle Chinese Support questions
(Edit Section↓) 2.3? code example
    • http://newedit.tigris.org/technical.htm Limodou's newedit Editor's Technical manual, discusses some of the plug-in interface implementation, i18 implementation, wxpython use of related issues, worth Reference.
    • About plug-in extension mechanisms:
      • A simple Plugin Framework explains a very clever and easy way to provide plug-in interfaces for your Code. If you refer to a similar framework in the Java community, you have the Java plug-in Framework (JPF) and the OSGi Standard.
      • In addition, Mr. Limodou in the Ulipad implementation of Plug-ins and mixin mechanism is also very simple and effective, see [newedit] Design Notes (a)-overview, of course, in the latest version of the Ulipad code for the implementation of this mechanism has a practical improvement. (there are many projects using Python Eggs to publish Plugins)
      • More complex applications can use a mechanism such as Zope Component architecture to enable flexible and easy-to-use extension interfaces (note: Zca is an integral part of the Zope platform, but it does not need to rely on the Zope platform for its own use).
(Edit Section↓) 3.? Common tools
    • Http://www.scons.org/Java has Ant's build tool for this huge fire, and Python's features allow us to build tools for updating types, which is Scons.
    • Python Sidebar is a plugin for Mozilla Firefox that provides a sidebar for viewing Python documents and Libraries.
    • IPython is a very useful Python Shell.
    • Easy Install a quick installation of the Python Module's Ease-of-use solution (packages issued in this way are typically automatically processed in Python eggs format by the simple install). It is recommended that you use VIRTUALENV to build a virtual Python environment before using Easy_install (you do not need to add--prefix parameters).
      • Mac says Setuptools version too low problem
(Edit Section↓) 3.1? Python IDE


My IDE selection experience I'm only using VIM and Pydev now.


  • Pydev is an eclipse-based, great Python environment that is very fast to improve and is now my favorite Ide.
  • The lightweight, full-featured, cross-platform IDE Ulipad Python+wxpython is easy to Use. I'll Use this when I do some simple little things.
  • The Eric Python IDE is a very good cross-platform Python ide based on QT Implementations. Supports debugging, supports auto-completion, and even supports Refactoring. I would have chosen this if there was no Ulipad and the qt-based Eric interface under my gnome was not shape.
  • The Spyder is almost a lightweight Eric, and is also based on QT and QSCINTILLA2 implementations. It is a component of the scientific computing package Python (x, y) (a Python third-party library that integrates scientific computing, with more than 400 m).
  • Http://www.xored.com Trustudio an eclipse-based, python-and php-enabled plugin that used to be my favorite Python ide environment, but it was a bit of a complete experience, but it was not very useful when I tried it.
  • http://www-900.ibm.com/developerWorks/cn/opensource/os-ecant/index.shtml Python Development with Eclipse and ANT
  • Http://www.scintilla.org/supports both the win and Linux source editor, which seems to support the editing of Python Files.
  • Http://boa-constructor.sourceforge.net/'s famous python IDE for fast generation of wxpython-based gui, but the development progress is really poor ...
  • Http://pype.sourceforge.net/'s Mature Python code editor, known as an editor that functions between Emacs and Idle.
  • Http://www.stani.be/python/spe Spe: claims to be a full featured editor with integrated Wxglade support for GUI DESIGN.
  • Eggy python IDE with Python and Qt is said to be lightweight and easy to use ~
(Edit Section↓) 3.2? Built-in class library use reference
    • Python Regular Expressions How-to guides
      • To facilitate debugging of regular expressions, you can use either Kodos (based on PyQT), Kiki (wxPython-based), Pyreb (wxPython-based) to Assist.
      • I am currently using kiki, but recently its official website does not go up, i from the Debian package to its source, the application of Stani do wxpython 2.8 compatibility patch, and use Py2app to encapsulate it as a MAC application for QuickSilver call 。 Modify the source code package download Later.
(Edit Section↓) 3.3? Common Third-party class libraries
  • NumPy Python's Mathematical Operations library, sometimes some other libraries will also invoke some of the functions inside, such as arrays or something;
  • Pil python under the famous Image processing library Pil;
  • SimPy uses Python for simulation and simulation solutions;
  • Matplotlib is said to be a Python module for drawing two-dimensional graphics, which clones many of the functions in MATLAB to help Python users easily get high-quality (up to publication Level) two-dimensional graphics;Graphviz and matplotlib, This thing can draw: map, network structure, finite state machine and so On. is not implemented in Python itself, but can be found in Python Encapsulation.
  • Crypto Python's Encryption and decryption extension module;
  • Python for CJK provides support for CJK languages related to Python: transcoding, display, and so On.
  • Psyco, Pyrex: Two solutions for improving the efficiency of Python code; if you're not satisfied with performance, try This: write your own C Module in Python.
  • pyflakes, pychecker, pylint: are all tools used to do Python code syntax checking.
  • Graphical interface Development library:
      The
      • wxpython  wxwindows-based, easy-to-use and powerful graphical interface development package Wxpython;wxpython release also comes with pycrust, pyshell, pyalacarte and pyalamode and several other tools, is the graphical interface shell and code editor, respectively, with different characteristics can be selected according to their own needs.
      • pyqt  is generally considered to be a combination of performance on various platforms, The span class= "wikiword" >PYQT provides more reliable performance than Wxpython and is less likely to encounter outlandish bugs. Just QT although lgpl, but pyqt business software is still charged, Nokia just started to do LGPL qt binding--pyside, But not yet Mature.
        • Detailed steps to install PYQT on a Mac   PYQT has binary packages that can be installed directly on both win and linux, only the Mac does Not. But it's not hard to do it in this document (i've tried it and everything is).
      • pygtk qt forever competitors, both win and Linux perform well, The new localization migration under Mac bypasses the System's own X11 service, and the performance is greatly improved, but also lacks the input method and font Support.
        • installs GTK-OSX according to building GTK-OSX and then installs PYGTK as described in the GTK + Python page, which is easy.
  • Tornado is a non-blocking, high-performance, extensible Web Server implementation that originates from Friendfeed.
  • Http://avc.inrim.it/html/is a more user-friendly development framework than the MVC pattern, mainly to help transparently complete the content binding between interface controls and background Data. The framework supports the GUI development framework, such as gtk, QT, TK, wxwidgets, etc., which are mainly python-encapsulated.
  • Pygame uses Python to help develop a library of games, or to use this to play video or audio, presumably relying on sdl;
  • Py2exe win a tool to compile a Python program into an executable is a way to get the program out of the Python runtime, or to build a Windows service or COM component. Other tasks that can be done with the Python script to the executable are Gordon McMillan's Installer, Linux/unix dedicated freeze, mac-specific py2app, and Setuptools may also be able to help. however, This kind of tool inevitably has some compatibility problems with some modules, which need to be tested NOW. In summary, This topic can be consulted on how to distribute commercial Python Applications.
  • Embedded database: berkeleydb python version, of course, there are many Others.
  • Peak provides some of the important base class libraries for automating cluster testing, such as the ultralight threading framework, distributed code execution, and so On.
    • Greenlet is an in-process threading model implementation given by peak, claiming to be a byproduct of the stackless Project. In fact, this is a pseudo-thread, that is, the switch between Greenlet need to explicitly specify the next switch to which block of instructions to continue execution, and the code is temporarily suspended without Execution. The execution order of the greenlet between the two is completely deterministic and non-concurrent, and cannot resolve the problem that the operation with a large amount of resources occupied for a long time can cause the program to become Unresponsive. But Greenlet can be used to reduce resource deadlock, mutual exclusion caused by resource consumption (when The code is blocked, you can switch to perform other blocks that are not blocked), so it is very useful to respond to button clicks.
      • Greenlet is now no longer part of the pylib, but a separate PyPI package called greenlet, which can be installed by Easy_install.
    • Eventlet is a high-concurrency network library based on greenlet, which provides many very convenient mechanisms such as "thread" pool, message queue, etc., which is much more convenient than using Greenlet directly. And Eventlet from the famous virtual reality Project-second life, is a reliable solution that is tested in Reality.
  • Pyro a Python distributed object system that provides object-oriented RPC Functionality.
  • Pycurl legend This is the most efficient solution for multi-threaded web crawling under python, essentially the encapsulation of the Libcurl C language library. In fact, twisted can also be customized to become a web Crawler.
  • Protocol buffers The efficient data serialization solution provided by google, which is about an order of magnitude higher in data size and codec efficiency than xml-based data serialization Schemes. of course, Google itself also said that this method is not suitable for all, one protocol buffers is not suitable for processing formatted text, on the other hand, its essence is a transmission protocol generation language, It is possible to transfer the content is relatively fixed, it is worthwhile to generate a set of such a parser.
  • Pyiotify uses the notify mechanism provided by the operating system itself to monitor file changes with maximum Efficiency.
  • Scrapy is a web crawler framework that makes it very easy to customize rules to get the crawler you Need. Based on the Twisted Implementation.
  • Chardet A library that guesses about page encodings, such as Utf-8 or gb18030, guesses based on HTTP parameters, HTML tags, and related declarations in XML tags. Another non-python-implemented eNCA can also provide similar Functionality.
  • Jpype Python calls the Java class library, the Java code bridging solution (as Limodou mentioned on chinaunix). Jpype Use points
  • Μtidylib the python package of the famous HTML collation, troubleshooting, auto-correction tool HTML Tidy library. Usually before you formally start analyzing html, Use this thing to preprocess it, and the work behind it will be easier and more accurate.
  • Fudge is considered by the HD project team to be the best Python mock module (also known as the Smoke test).
  • Nose test scripts automatically discover, automate, and execute accessibility tools. See Nose documentation for Documentation.
  • The coverage.py Python Test Code Coverage Statistics tool has been built into Nose.
  • Heapy is a module for the memory footprint of the Python program, one of the components of the Guppy-pe project, and is used as a debugging tool for memory leaks by Scrapy and other Projects. Similar to the Following:
    • pysizer, the feeling is too old.
    • dowser, Unlike Heapy features, and uses Cheerypy as the output interface for debugging Results.
  • Gluttony the automatic generation tool for dependency graphs between Python Modules.
(Edit Section↓) 3.4? Other things
  • http://www.forum.nokia.com/main/0,,034-821,00.html Nokia has released a library that runs a Python program (graphical interface with Wxpython) on a series 60 system. There is also a wiki page about This: http://www.postneo.com/postwiki/moin.cgi/PythonForSeries60. Python4symbian This page is a record of my usage experience.
  • Pyre: is it really possible to do a package that uses Python for high-performance computing needs? Haven't studied Yet.
  • Parallel python: A parallel computing solution for pure Python. Related Chinese reference page
  • Pexpect: a tool that uses Python as a shell to control other command-line programs (such as the standard ftp, telnet, and so on in Linux) is not yet available for Testing.
  • Pyjamas:google Gwt's python clone is still in its early version.
  • The Durus:python object database, of course, can also be used as a mechanism for object instance persistence; This is an open source pure Python implementation and provides an optional C language plug-in to greatly improve operational efficiency.
    • Missile DB: a python, concise and efficient DBMS, claiming to be a derivative of durus, is more adaptable to the stackless Python Environment. It is also a sub-project of the EURASIA3 project with high concurrency Performance.
  • Ey-lessql: python version of the collection of various distributed Key-value Databases. If you do not consider a python-driven problem, a Yes for a NoSQL taxonomy is a very complete list of NON-SQL data storage Engines.
    • One of the NoSQL databases-why use a non-relational database?
    • NOSQL Patterns
    • The key value database I'm Most interested in is mongodb, and some people think it's basically a replacement for what MySQL can offer, and it's more performance!
      • Ming could be a Python package like the ORM that works with relational databases ?
      • Pymodels MongoDB's Lightweight ORM package, It was originally used for the Tokyo tyrant and Tokyo Cabinet.
  • Pyzmq: Message Queuing zerozmq Python encapsulation, Basically this is a performance-oriented Message Queuing implementation, All the data is stored in Memory. If you are concerned about data persistence, consider similar scenarios such as RabbitMQ. It is also rumored that Twitter has been converted from RABBITMQ to Kestrel.
  • Mulib and Restish are both Python-based RESTful Web service frameworks.
  • Scapy: It seems to be an interactive Python tool that controls the underlying network packets, which should be useful for network protocol Analysis.
(Edit Section↓) 3.5? Something Interesting.
    • Howie: The MSN Dialogue Robot implemented with Python.
    • Cankiri: a screen recorder implemented with a Python script.
(Edit Section↓) 3.6? Something common, but probably useful.
    • Pyforum: a purely python-implemented forum program that is closest to the practical level, based on the web2py Implementation.


[turn]python Common class library!]


Related Article

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.