We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Lib/platform.py, there's a code aimed to determine the Windows version python runs in.
for cmd in ('ver', 'command /c ver', 'cmd /c ver'): try: info = subprocess.check_output(cmd, stdin=subprocess.DEVNULL, stderr=subprocess.DEVNULL, text=True, encoding="locale", shell=True)
As much as I understand, one shouldn't invoke whole new process just to question what OS version he runs at.
so just before invoking cmd.exe, we will try to question winapi directly.
# Load ntdll.dll and call RtlGetVersion ntdll = ctypes.WinDLL("ntdll") rtl_get_version = ntdll.RtlGetVersion rtl_get_version(ctypes.byref(os_version))
No response given
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Feature or enhancement
Proposal:
In Lib/platform.py, there's a code aimed to determine the Windows version python runs in.
As much as I understand, one shouldn't invoke whole new process just to question what OS version he runs at.
so just before invoking cmd.exe, we will try to question winapi directly.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: