moznetwork — Get network information

moznetwork is a very simple module designed for one task: getting the network address of the current machine.

Example usage:

import moznetwork

    ip = moznetwork.get_ip()
    print "The external IP of your machine is '%s'" % ip
except moznetwork.NetworkError:
    print "Unable to determine IP address of machine"

Provides an available network interface address, for example “”.

A NetworkError exception is raised in case of failure.