Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Python Networking
  • Table Of Contents Toc
  • Feedback & Rating feedback
Learning Python Networking

Learning Python Networking

By : Dr. M. O. Faruque Sarker, Samuel B Washington, Sam Washington
3.7 (7)
close
close
Learning Python Networking

Learning Python Networking

3.7 (7)
By: Dr. M. O. Faruque Sarker, Samuel B Washington, Sam Washington

Overview of this book

If you're a Python developer or a system administrator with Python experience and you're looking to take your first steps in network programming, then this book is for you. Basic knowledge of Python is assumed.
Table of Contents (12 chapters)
close
close
10
A. Working with Wireshark
11
Index

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "IP addresses have been assigned to your computer by running the ip addr or ipconfig /all command on Windows."

A block of code is set as follows:

import sys, urllib.request

try:
    rfc_number = int(sys.argv[1])
except (IndexError, ValueError):
    print('Must supply an RFC number as first argument')
    sys.exit(2)

template = 'http://www.ietf.org/rfc/rfc{}.txt'
url = template.format(rfc_number)
rfc_raw = urllib.request.urlopen(url).read()
rfc = rfc_raw.decode()
print(rfc)

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are highlighted:

<body>
...
<div id="content">
<h1>Debian &ldquo;jessie&rdquo; Release Information</h1>
<p>Debian 8.0 was
released October 18th, 2014.
The release included many major
changes, described in
...

Any command-line input or output is written as follows:

$ python RFC_downloader.py 2324 | less

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "We can see there's a list of interfaces below the Start button."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

We follow PEP 8 as closely as we can, but we also follow the principle that practicality beats purity, and do deviate in a few areas. Imports are often performed on a single line to save space, and we may not strictly adhere to wrapping conventions do to the nature of printed media; we aim for "readability counts".

We have also chosen to focus on the procedural programming style rather than use object-oriented examples. The reason for this is that it is generally easier for someone familiar with object oriented programming to rework procedural examples into an object oriented format than it is for someone unfamiliar with OOP to do the reverse.

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY