This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients eryksun, lemburg, paul.moore, sahsariga111, steve.dower, tim.golden, vstinner, zach.ware
Date 2021-10-20.13:45:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634737541.34.0.768093927508.issue45382@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-10-20 13:45:41steve.dowersetrecipients: + steve.dower, lemburg, paul.moore, vstinner, tim.golden, zach.ware, eryksun, sahsariga111
2021-10-20 13:45:41steve.dowersetmessageid: <1634737541.34.0.768093927508.issue45382@roundup.psfhosted.org>
2021-10-20 13:45:41steve.dowerlinkissue45382 messages
2021-10-20 13:45:41steve.dowercreate