Skip to content

Instantly share code, notes, and snippets.

@rodfersou
Forked from brainix/p_vs_np_2.py
Created March 4, 2016 20:42
Show Gist options
  • Save rodfersou/f48c21519dfde1063952 to your computer and use it in GitHub Desktop.
Save rodfersou/f48c21519dfde1063952 to your computer and use it in GitHub Desktop.
from nettools import NetworkElement
with NetworkElement('171.0.2.45') as ne:
for route in ne.routing_table:
print '%15s -> %s' % (route.name, route.ipaddr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment