Welcome, guest | Sign In | My Account | Store | Cart

Complete IPv4 class that can represent a host or network, and iterate over networks. Supports slash notation, stringifying, and range generation (among other things).

Python, 4 lines
Too big to paste here. Get it from here:


This class should handle just about any IP address related operation. If it doesn't handle yours please let me know.


Rune Strand 19 years, 9 months ago  # | flag
Bill Anderson 18 years, 9 months ago  # | flag

URL Works for me. URL worked just fine today.

Eli Criffield 18 years, 2 months ago  # | flag

cheeseshop? This looks like something that should be added to the Python Package Index http://cheeseshop.python.org/

Stuart Woodward 16 years, 7 months ago  # | flag

Is this still available? Is this still available?

Keith Dart (author) 11 years, 5 months ago  # | flag

Updated URL. It's now part of the Pycopia collection.

Created by Keith Dart on Wed, 25 Jul 2001 (PSF)
Python recipes (4591)
Keith Dart's recipes (4)

Required Modules

Other Information and Tasks