[python-win32] detecting windows type

Tim Roberts timr at probo.com
Fri Sep 9 19:44:43 CEST 2005


On Fri, 09 Sep 2005 09:42:18 +0200, le dahut <le.dahut at laposte.net> wrote:

>Maybe I can parse the output of a 'ipfonfig' command, 
>

Nope, that won't work.  Ipconfig is NT-only.  95 and 98 have winipcfg, 
but it is a GUI tool, not a command-line tool.

>but commands.getoutput only work with unix, not with windows. Is there
>another way to get the output of a command line program under windows ?
>

The usual way is to use os.popen, which works everywhere.  However, as I 
said, that won't help you with this information.

In fact, it is surprisingly difficult to get information about the 
network interfaces on a 95/98 machine.  Have you tried the downloadable 
WMI support mentioned earlier?

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-win32 mailing list