Re: [Tutor] python and interface duplex checks

2007-12-12 Thread Michael Langford
Python can easily run ifconfig -a itself and then move through its output. You can either parse out each string and then redisplay them. If you *really* want to rewrite ifconfig, you need to call ioctl (http://docs.python.org/lib/module-fcntl.html) and you need passing in ioctl codes such as ones

Re: [Tutor] python and interface duplex checks

2007-12-12 Thread Michael Langford
Most easily: If your card supports ethtool, you can just open the ethtool startup config file to check there whether or not you set it to duplex in the configuration (see if you have an ETHTOOL_OPTS env variable). If you're not sure if your card can handle duplex (or you're not sure the config fil