What network-related knowledge should I learn about Python network programming?

Source: Internet
Author: User
I have been learning Python for a long time, but I have never felt any obvious indication. After thinking about it recently, I still feel that my goal is not clear enough. I don't know what I can do after learning it (for amateurs, learning programming is a hobby). So I am reading everything, but nothing works. Finally, let's take a look at network programming. Please advise what you need to learn. I have been learning Python for a long time, but I have never felt any obvious indication. After thinking about it recently, I still feel that my goal is not clear enough. I don't know what I can do after learning it (for amateurs, learning programming is a hobby). So I am reading everything, but nothing works. Finally, let's take a look at network programming. Please advise what you need to learn. Reply: Python network programming is a very large category. I personally feel that the points to be mastered are:
1. How to Use Python to create a socket, how to bind the socket with the specified IP address and port, and how to use socket to send data and accept data,
2. How to Use the processing thread in Python to compile a web server that can simultaneously process multiple requests
3. how to Use Python to control the logic of the HTTP layer, including how to create http GET, POST, PUT, DELETE requests, and how to handle received HTTP requests, which involve the httplib of python, basehttpserver and other modules
4. master a basic python web development framework, such as webpy, django, and pylon.
5. Understand non-blocking HTTP servers, such as tornado
6. Understand the message-driven network engine compiled by twisted and python.

References:
Basic network knowledge
1. HTTP: the definitive guide http://www.amazon.com/HTTP-Definitive-Guide-David-Gourley/dp/1565925092/
2. Computer Networking: A Top-Down Approach http://www.amazon.com/Computer-Networking-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. Document http://docs.python.org/library/socket.html for python socket programming
3. python httplib document http://docs.python.org/library/httplib.html

Common python framework documents:
1. django official website https://www.djangoproject.com/
2. twisted official website http://twistedmatrix.com/trac/
3. http://www.tornadoweb.org of tornado official website/ In my personal experience, you may wish:
1. write basic TCP connections, know the TCP writing steps, such as creating a socket, binding a port, and reusing the port. learn a little about TCP, know each field of the protocol, and understand three-way handshakes.
2. Understand basic server concurrency models, such as multi-process, multi-thread, and IO multiplexing.
3. understand some network libraries such as twisted

In fact, I have to read UNP, TCPv1, and other books, but these languages are based on C.
I wrote C ++ programs in Linux. I feel that I want to study them in depth and generally use C to describe them,
Python is a language with a high level of abstraction, which is easy to grasp and suitable for getting started. However, it also avoids many problems, which are generally divided into web programming and network programming. Therefore, it is best to distinguish the two concepts. The former is more inclined to learn some mainstream frameworks and build their own websites, while the latter is to describe and implement them from the lower layer. Therefore, we recommend that you first find the ones you are interested in and study them well. Can refer to the following answer, this answer is not good for English, how to look at the technical documentation in English also has reference, against the source code read http://docs.python.org/2/library/ It is helpful for English.

_ Cutline_start _ = '-' * 20 + 'The following are the answers forwarded by Lai Yonghao' + '-' * 20
It is not clear whether you are referring to the underlying network programming or application web development. If you are using a website, it is web development. We recommend that you first go to the python web development framework. We recommend that you start with Django. The document is more detailed.
Django: https://www.djangoproject.com/ Socket Programming in Python I also learned a simple tutorial here. First, I learned the basics of network programming in English. I strongly recommend that you learn twisted.

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.