Network monitoring using Python