How to check if the connectivity is via Ethernet or dial-up

Roy Smith roy at panix.com
Sat Jul 8 16:34:42 EDT 2006


In article <1152390149.961365.282720 at 35g2000cwc.googlegroups.com>,
 "jb" <jsbraich at gmail.com> wrote:

> Hi all:
> 
> I was just wondering if there is a way to check (using python
> scripting) whether the computer's connectivity is via Dial-up or
> LAN/Ethernet adaptor? Is there a way in python to check the status of
> all available Ethernet adaptors?  If not is there a way to achieve this
> by  just checking some network parameters using System module?.

The best I could suggest is get the pysnmp module, and that to poke around 
in the interface table (assuming your box is running an SNMP agent).



More information about the Python-list mailing list