[python-win32] detecting windows type

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Thu Sep 8 17:02:42 CEST 2005


le dahut wrote:
> Hello,
> 
> How is it possible to detect which kind of windows a python script is
> running on ? (9x, Me, 2k, XP, 2k3)

You can use sys.getwindowsversion() for that. Check MSDN documentation 
for the precise meaning of the result.

> An other question:
> I've a script using
> win32com.client.Dispatch("WbemScripting.SWbemLocator") but it doesn't
> seem to function on win 9x. This script is intended to detect the
> computer's network configuration (gateway, dns, ip addr, subnet mask).
> Does someone know how to obtain those informations on a win 9x ?

Sorry, no idea.

-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven



More information about the Python-win32 mailing list