Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5421 > unrolled thread
| Started by | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| First post | 2011-05-15 12:12 +0100 |
| Last post | 2011-05-15 12:12 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Get the IP address of WIFI interface Tim Golden <mail@timgolden.me.uk> - 2011-05-15 12:12 +0100
| From | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| Date | 2011-05-15 12:12 +0100 |
| Subject | Re: Get the IP address of WIFI interface |
| Message-ID | <mailman.1592.1305457939.9059.python-list@python.org> |
On 15/05/2011 12:04 PM, Neal Becker wrote: > Far.Runner wrote: > >> Hi python experts: >> There are two network interfaces on my laptop: one is 100M Ethernet >> interface, the other is wifi interface, both are connected and has an ip >> address. >> The question is: How to get the ip address of the wifi interface in a python >> script without parsing the output of a shell command like "ipconfig" or >> "ifconfig"? >> >> OS: Windows or Linux >> >> F.R > > Here's some useful snippits for linux: ... and for Windows: <code> import wmi for nic in wmi.WMI ().Win32_NetworkAdapterConfiguration (IPEnabled=1): print nic.Caption, nic.IPAddress </code> TJG
Back to top | Article view | comp.lang.python
csiph-web