加载中...

Python

  1. Home
  2. Computing & Technology
  3. Python

Building a Web Client in Python

By Al Lukaszewski, About.com

2 of 9

Programming Networks in Python: the Basics

All network transactions happen between clients and servers. In most protocols , the clients ask a certain address and receive data. The servers watch a port and give information.

To affect a network connection you need to know the host, the port, and the actions allowed on that port. Each port is associated with a service. Each server watches a different port.

Most web servers run on port 80, though it may sometimes be 8080. FTP lives on port 21, and secure shell (SSH) is on 22. For email, POP, SMTP, and IMAP all live on different ports.

You should note that these addresses are the common port numbers for the different services. A network administrator can change them for his or her network. As long as the client asks for the correct service on the right port at the right address, communication will still happen. Google's mail service, for example, does not run on the common port numbers but, because they know how to access their accounts, users can still get their mail.

Explore Python

More from About.com

New Year, New You

Take action today to accomplish your biggest goals with these motivating ideas.

Best Moves in a Bad Economy

Stay on top in this tough economy with our smart, easy-to-follow financial tips.

Python

  1. Home
  2. Computing & Technology
  3. Python
  4. Networking
  5. Python Networking : Programming Networks in Python

©2009 About.com, a part of The New York Times Company.

All rights reserved.