mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
gh-133711: Log Windows OEM code page in test.pythoninfo (#134840)
Add _winapi.GetOEMCP() function.
This commit is contained in:
parent
d83576bf48
commit
d9ec0ee733
3 changed files with 43 additions and 4 deletions
|
|
@ -920,10 +920,17 @@ def collect_windows(info_add):
|
|||
|
||||
try:
|
||||
import _winapi
|
||||
dll_path = _winapi.GetModuleFileName(sys.dllhandle)
|
||||
info_add('windows.dll_path', dll_path)
|
||||
except (ImportError, AttributeError):
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
dll_path = _winapi.GetModuleFileName(sys.dllhandle)
|
||||
info_add('windows.dll_path', dll_path)
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
call_func(info_add, 'windows.ansi_code_page', _winapi, 'GetACP')
|
||||
call_func(info_add, 'windows.oem_code_page', _winapi, 'GetOEMCP')
|
||||
|
||||
# windows.version_caption: "wmic os get Caption,Version /value" command
|
||||
import subprocess
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue