Python network resources + python Manual

Source: Internet
Author: User

How to learn Python + how to effectively utilize Python-related network resources + How to take advantage of Python's own manual (Python Manual)almost forgot to say, before looking at all the content below, for the Python version does not understand, please be sure to check this first:

Collation summarizes the differences between Python2 (Python 2.x version) and Python3 (Python 3.x version)

Then, depending on the situation, choose the Python version that you need before it comes to the question of how to learn.

"Learn the basic process of Python"

1. Learn the basics of Python first

Recommended Information:

Dive into Python

The Chinese homepage is:

http://woodpecker.org.cn/diveintopython/

Can be viewed online:

Deep python:D ive into python Chinese version

You can also download various formats:

    • Html
    • HTML (Single file)
    • PDF (A4)
    • Microsoft Word 2003
    • Windows Help
    • Plain text

Stay in the local view.

1. Python's third-party library

Python's third-party library, a huge number of functions, but it is because too much, it is impossible to summarize one by one.

But Python's official website has been sorted out and put here:

Http://pypi.python.org/pypi?%3Aaction=index

The page is very inconvenient because of too many libraries.

Here are the categories to view:

Http://pypi.python.org/pypi?%3Aaction=browse

If you need some aspects of the function, you can go to the above two addresses, find out if there is no ready-made library, if any, directly to use, than you developed from scratch, to be more efficient.

2. Summary of the various Python information

This includes a summary of the Python language I wrote, which consists of two main pieces:

(1) Python learning experience and experience

Summarize some of the understanding in the process of tossing python, and some of the details of the considerations.

(2) Crifan Python library: crifanlib.py

Use some of the usual python functions and organize them for you and others.

Especially a lot of network functions, when you use, you will know that will save you a lot of energy.

"How to use Python to bring your own manual Python Manual"

One of the most important things to note about reference materials is that for many unfamiliar Python functions, the best way to learn is to go to Python's own manual to find it first.

And Python comes with the manual, after you install Python, (my Windows environment, through EXE installed Python version 2.7), you can start->python 27-> python mannuals:

For example, involves network programming, need to use URLLIB2 this module, want to understand URLLIB2.

So the first step, you can first go through manual to find URLLIB2:

And then look at the syntax:

urllib2. Urlopen (url[, data][, timeout] )
Open the URL url, which can be either a string or a RequestObject.

Warning

HTTPS requests do does not have any verification of the server ' s certificate.

Data may are a string specifying additional data to send to the server, or None if no such data is needed. Currently HTTP requests is the only ones, which use data; The HTTP request would be a POST instead of a GET when the data parameter is provided. Data should is a buffer in the standard application/x-www-form-urlencoded format. The urllib.urlencode () function takes a mapping or sequence of 2-tuples and returns a string in this format. URLLIB2 module sends http/1.1 requests withConnection:closeheader included.

The optional timeout parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not Specified, the global default timeout setting would be used). This actually only works for HTTP, HTTPS and FTP connections.

This function returns a File-like object with the additional methods:

    • Geturl () -return The URL of the resource retrieved, commonly used to determine if a redirect was followed
    • info () -return The meta-information of the page, such as headers, in the form of a mimetools. Message instance (see Quick Reference to HTTP Headers)

Raises Urlerror on errors.

Note that None is returned if no handler handles the request (though the default installed global Openerd Irector uses unknownhandler to ensure this never happens).

In addition, default installed Proxyhandler makes sure the requests is handled through the proxy when they is s Et.

Changed in version 2.6:timeout was added.

So, to have a basic understanding of it, then go to the online detailed look at other people's sample code.

This helps you to learn this library function quickly and accurately.

At the very least, I have learned and learned so much about many of the python built-in library functions.

  • A Concise Python tutorial

    Swaroop, C. H.,> Shen Jieyuan Translation

    Features: The content is very full.

  • Deep Python 3
  • About Python's Chinese documentation

    Here: Http://www.elias.cn/Python/HomePage introduces a lot of resources. There is the Chinese version of the Python tutorial

  • Live demo of Python code running online

    Online Python Tutor-learn programming by visualizing code execution

  • Sample program for Python

    Simpleprograms-python Wiki

  • Sample code for various Python

    Python Examples (example source code) organized by topic

  • Detailed explanations and examples of Python style

    Code like a pythonista:idiomatic Python

  • How to write your own library functions

    http://postgetter-app.googlecode.com/hg-history/04cc032892e8a81a46eeb15ec7814fc3b39ed6ab/PostGetter.py worth learning. It is worth learning about how to write, how to handle logger and exceptions, and so on when you write classes, library functions.

  • Python Data Encyclopedia

    Http://simple-is-better.com/sites/collects n more about Python's web sites, tutorials, books, frameworks, apps, and more.

  • About the IDE with the introduction of Python

    Https://wiki.python.org/moin/IntegratedDevelopmentEnvironments

  • Micropython

    Before you see a fun, alternative version of Python:

    Micropython

    Micro Python:python for microcontrollers

Python network resources + python Manual

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.