Alternatively, you can run ipconfig/ifconfig depending on the operating system and parse the results. I have been using this method for a year now and it works great. I would much rather have an API solution, but this method seemed to be the easiest with the fewest dependencies on external libraries, as you only need the subprocess module. It is also able to give you ALL of the IP addresses on the machine.
On Tuesday, February 28, 2012 10:14:04 AM UTC-5, José Luis Redrejo Rodríguez wrote: > > You can use netifaces, http://alastairs-place.net/projects/netifaces/ > El 28/02/2012 11:39, "Sanjeet Kumar" <[email protected]> escribió: > >> How we can get the IP address of the system >> > On Tuesday, February 28, 2012 10:14:04 AM UTC-5, José Luis Redrejo Rodríguez wrote: > > You can use netifaces, http://alastairs-place.net/projects/netifaces/ > El 28/02/2012 11:39, "Sanjeet Kumar" <[email protected]> escribió: > >> How we can get the IP address of the system >> > On Tuesday, February 28, 2012 10:14:04 AM UTC-5, José Luis Redrejo Rodríguez wrote: > > You can use netifaces, http://alastairs-place.net/projects/netifaces/ > El 28/02/2012 11:39, "Sanjeet Kumar" <[email protected]> escribió: > >> How we can get the IP address of the system >> > On Tuesday, February 28, 2012 10:14:04 AM UTC-5, José Luis Redrejo Rodríguez wrote: > > You can use netifaces, http://alastairs-place.net/projects/netifaces/ > El 28/02/2012 11:39, "Sanjeet Kumar" <[email protected]> escribió: > >> How we can get the IP address of the system >> >

