Re: Get the IP address of WIFI interface

2011-05-16 Thread Jun Hu
Thanks, this code works perfectly in ubuntu 10.04. one question though, is dbus usually implemented in other distribution of linux? On Mon, May 16, 2011 at 12:57 PM, Anssi Saari wrote: > Neal Becker writes: > > One possible solution in Linux is asking NetworkManager, if it's in > use. It knows

Re: Get the IP address of WIFI interface

2011-05-15 Thread Jun Hu
On Sun, May 15, 2011 at 2:14 PM, Andrew Berg wrote: > > One thing I found out about Win32_NetworkAdapterConfiguration is that it > only contains /current/ information and not the stored info that it uses > when making an initial connection (you can see and edit this info in the > Network and Shari

Re: Get the IP address of WIFI interface

2011-05-15 Thread Jun Hu
Thanks for the tip, it is really helpful! however the class of Win32_NetworkAdapterConfiguration doesn't include the interface type (you can NOT tell if it is a wifi interface), so I change the code a bit like following: import wmi wlan_int_id=None for nic in wmi.WMI().Win32_NetworkAdapter():

Re: Get IP address of WIFI interface

2011-05-14 Thread Jun Hu
Thanks, is there any other way without using external command? On Fri, May 13, 2011 at 10:41 PM, Ishwor Gurung wrote: > Hi. > > On 14 May 2011 14:46, Far.Runner wrote: > > Hi Python Experts: > > There are two network interfaces on my laptop, one is > > 100M Ethernet interface, the other is wifi

How to get the IP address of the wifi interface?

2011-05-13 Thread Jun Hu
Hi python experts: There are two network interfaces on my laptop, one is 100M Ethernet, the other is wifi, both are connected and have IP addresses. The question is: how to get the ip address of WIFI interface without parsing the output of a shell command like "ipconfig" or "ifconfig"? OS: Windows