Steve Dower <steve.do...@python.org> added the comment:

All that said, if we're going to shell out to "ver", we may as well try "wmic 
os get Caption,Version /value" first and parse its output. For me, it looks 
like the below (with a number of blank lines around it):

Caption=Microsoft Windows 10 Enterprise
Version=10.0.19043

I would assume the output is in MBCS, and there doesn't appear to be an option 
to change that - the "/locale" option appears to influence translations, rather 
than encoding.

We'd still want the "ver" fallback I think. The wmic command is deprecated in 
favour of PowerShell commands, which means we would have to implement native 
calls to get equivalent functionality. But I expect neither cmd.exe nor 
wmic.exe will actually disappear for a long time.

----------

_______________________________________
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