What network-related knowledge does Python network programming need to learn?

Source: Internet
Author: User
Python has been learning for a long time, but it has never felt obvious. Recently think about, or feel that their goals are not clear enough, not clear what can be done after learning (amateur, learning programming is a hobby), so everything is looking at, but nothing has become. Summed up the next, to determine in the network programming in depth, trouble everyone to teach under what kind of things to learn.

Reply content:

Python network programming is a big category, the personal feeling need to grasp the points are:
1. How to use Python to create a socket, how to bind a socket to a specified IP address and port, use a socket to send data, accept data,
2. How to work with threads in Python to write a Web server that can handle multiple requests at the same time
3. How to use Python to control the logic of the HTTP layer, including how to create an HTTP Get,post,put,delete request, how to handle the received HTTP request, which are related to Python httplib, basehttpserver and other modules
4. Master a basic Python web development framework, such as Webpy, Django,pylon
5. Understand the non-blocking HTTP Server, such as tornado
6. Learn about twisted, a message-driven network engine written by Python

References:
Basic knowledge of the network
1. Http:the Definitive Guide http://www. Amazon.com/http-definit ive-guide-david-gourley/dp/1565925092/
2. Computer Networking:a Top-down Approach http://www. amazon.com/computer-net Working-top-down-approach-edition/dp/0136079679/ref

Python Network Programming Basics
1. Python Network programming http://www. amazon.com/foundations- python-network-programming-goerzen/dp/1590593715
2. Python Socket Programming Documentation / http docs.python.org/library /socket.html
3. Python Httplib Documentation / http docs.python.org/library /httplib.html

Python Common Framework Documentation:
1. Django's official website https://www. djangoproject.com/
2. Twisted's official website / http twistedmatrix.com/trac/
3. Tornado's official website http://www. tornadoweb.org/ In my personal experience, it is advisable to:
1. Write the basic TCP connection, know the steps to write TCP, such as creating a socket, binding port, port multiplexing, and so on, a little understanding of TCP, know each field of the protocol, understand the three-time handshake.
2. Understand the basic server concurrency model, such as multi-process, multi-threading, Io multiplexing
3. Learn about some network libraries such as twisted

Actually want to study in depth still have to read "UNP" "TCPv1" such as books, but this kind of language is based on C.
I write C + + programs under Linux, my feeling is to delve into the depth, is generally used in C to describe,
With Python, this language, high level of abstraction, easy to grasp the focus, suitable for use, but also to avoid a lot of problems generally divided into web programming and network programming, so it is better to distinguish between the concept of both. The former is more inclined to learn some of the mainstream framework and build their own sites, the latter is from the bottom up to describe and implement. So it is advisable to find out what is interesting and study well. can refer to the following answer, the answer to the English is not good how to see the technical English document problems also have reference, read the code against the source / http Docs.python.org/2/libra ry/ be helpful in English.
__cutline_start__='-'*20+'以下转发赖勇浩的答案'+'-'*20
It is unclear whether you are referring to the underlying network programming or the application-specific web development. If it is a website, it is web development, it is recommended to look at the Python Web development framework, recommended from Django, the document more detailed
Django: https://www. djangoproject.com/ Socket Programming in Python Here is a simple tutorial I am also learning, the first feeling is to learn English first after the basic knowledge of network programming. It is highly recommended to learn twisted.
  • 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.