[python-win32] detecting windows type

le dahut le.dahut at laposte.net
Tue Sep 13 14:33:27 CEST 2005


Thanks for your advice. A colleague told me how to get those
informations. First install WMI on the 95/98 station, then write the
program and compile it with py2exe, then it should work on every 95/98
station (also where WMI is NOT installed !).

Note that 'ipconfig' is available on win98 so a
os.popen('ipconfig /all') can be parsed to get infos.


K.

Le vendredi 09 septembre 2005 à 10:44 -0700, Tim Roberts a écrit :
> 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?
> 



More information about the Python-win32 mailing list