extraspecialbitter wrote:
I'm still trying to write that seemingly simple Python script to print
out network interfaces (as found in the "ifconfig -a" command) and
their speed ("ethtool "). The idea is to loop for each
interface and
print out its speed. I'm looping correctly, but have some issu
On Nov 1, 7:35 pm, Ian Kelly wrote:
> On Tue, Nov 1, 2011 at 5:19 PM, Miki Tebeka wrote:
> > In my box, there are some spaces (tabs?) before "Speed". IMO
> > re.search("Speed", line) will be a more robust.
>
> Or simply:
>
> if "Speed" in line:
>
> There is no need for a regular expression here.
On Tue, Nov 1, 2011 at 5:19 PM, Miki Tebeka wrote:
> In my box, there are some spaces (tabs?) before "Speed". IMO
> re.search("Speed", line) will be a more robust.
Or simply:
if "Speed" in line:
There is no need for a regular expression here. This would also work
and be a bit more discriminat
In my box, there are some spaces (tabs?) before "Speed". IMO re.search("Speed",
line) will be a more robust.
--
http://mail.python.org/mailman/listinfo/python-list
I'm still trying to write that seemingly simple Python script to print
out network interfaces (as found in the "ifconfig -a" command) and
their speed ("ethtool "). The idea is to loop for each
interface and
print out its speed. I'm looping correctly, but have some issues
parsing the output for al