Evernow <danielsuarez...@protonmail.com> added the comment:

As mentioned wmic is deprecated ( 
https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmic ). 

I don't see why the wmi module ( https://pypi.org/project/WMI/ ) can't be used 
instead to get the information, I have a working implementation of this that 
simply does the following: 

current_major_version = 
wmi.WMI().Win32_OperatingSystem()[0].Caption.encode("ascii", "ignore").decode(
            "utf-8")
if "8" in current_major_version:
        pass
elif "7" in current_major_version:  
        pass
elif "10" in current_major_version:  
        pass
elif "11" in current_major_version:
        pass

----------
nosy: +Evernow

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to