Network Programming

  • Magnus Lie Hetland


In this chapter, I give you a sample of the various ways in which Python can help you write programs that use a network, such as the Internet, as an important component. Python is a very powerful tool for network programming. Many libraries for common network protocols and for various layers of abstractions on top of them are available, so you can concentrate on the logic of your program, rather than on shuffling bits across wires. Also, it’s easy to write code for handling various protocol formats that may not have existing code, because Python is really good at tackling patterns in byte streams (you’ve already seen this in dealing with text files in various ways).


Networking Module Network Programming Standard Library Event Handler Uniform Resource Locator 

Copyright information

© Magnus Lie Hetland 2017

Authors and Affiliations

  • Magnus Lie Hetland
    • 1
  1. 1.TrondheimNorway

Personalised recommendations