ifconfig in python

2009-01-19 Thread Nehemiah Dacres
Is ther an easy way to get the resolved ip address of the machine a script is running on? socket.gethostbyname(socket.gethostname) has only returned the ip address of my loop back interface ... not very usefull. -- "lalalalala! it's not broken because I can use it" http://linux.slashdot.org/com

Re: defining class functions

2009-01-19 Thread Nehemiah Dacres
wouldn't you use a state change? Use a variable to indicate which function you want the first class to do On Mon, Jan 19, 2009 at 6:31 PM, James Mills wrote: > On Tue, Jan 20, 2009 at 10:08 AM, Astan Chee wrote: > > Hi, > > I have two classes in python that are in two different files/python > sc

Re: ifconfig in python

2009-01-20 Thread Nehemiah Dacres
I'll let this thought fester but I thought I'd put together a PEP to make this a function. Possibly in some util library but preferibly in the sys library sense this is where to get information about the system you are running on. On Tue, Jan 20, 2009 at 6:33 AM, Mark Wooding wrote: > Дамјан Гео

Re: ifconfig in python

2009-01-20 Thread Nehemiah Dacres
> > That doesn't mean that you can get away with a single address for the > entire host, though: you need addresses which correspond to the networks > you're attached to. > > -- [mdw] especially sense we are also getting into virtual NICs where you can have a webserver listening to one and broadca