update
This commit is contained in:
20
.CondaPkg/env/Lib/idlelib/util.py
vendored
20
.CondaPkg/env/Lib/idlelib/util.py
vendored
@@ -12,9 +12,25 @@ TODO:
|
||||
* std streams (pyshell, run),
|
||||
* warning stuff (pyshell, run).
|
||||
"""
|
||||
import sys
|
||||
|
||||
# .pyw is for Windows; .pyi is for typing stub files.
|
||||
# The extension order is needed for iomenu open/save dialogs.
|
||||
py_extensions = ('.py', '.pyw', '.pyi')
|
||||
|
||||
|
||||
# Fix for HiDPI screens on Windows. CALL BEFORE ANY TK OPERATIONS!
|
||||
# URL for arguments for the ...Awareness call below.
|
||||
# https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx
|
||||
if sys.platform == 'win32': # pragma: no cover
|
||||
def fix_win_hidpi(): # Called in pyshell and turtledemo.
|
||||
try:
|
||||
import ctypes
|
||||
PROCESS_SYSTEM_DPI_AWARE = 1 # Int required.
|
||||
ctypes.OleDLL('shcore').SetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE)
|
||||
except (ImportError, AttributeError, OSError):
|
||||
pass
|
||||
|
||||
# .pyw is for Windows; .pyi is for stub files.
|
||||
py_extensions = ('.py', '.pyw', '.pyi') # Order needed for open/save dialogs.
|
||||
|
||||
if __name__ == '__main__':
|
||||
from unittest import main
|
||||
|
||||
Reference in New Issue
Block a user