newb Q

Mike Fletcher mfletch at tpresence.com
Fri Jul 21 22:08:03 EDT 2000


Check Deja news for a _long_ thread on how to get IP addresses. 

http://x72.deja.com/[ST_rn=ps]/viewthread.xp?AN=647408915

HTH,
Mike

-----Original Message-----
From: Toy [mailto:gee308 at mediaone.net]
Sent: Friday, July 21, 2000 9:28 PM
To: python-list at python.org
Subject: newb Q


How can I make python issue the command, "ifconfig -a eth0", and then
parse the data to grab the IP?  I would think that you could tell Python
to look for the word, 'inet addr:"(is it different on different Unixes?)
and then tell it to get a number right after 'inet addr' that looks like
xx.x.xxx.xxx !!  Simple Q, but I'm new, thanks.

-- 
http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list