A Windows build with _tkinter, tkinter, and idlelib
but without ctypes is unlikely but apparently possible.
# Valid arguments for the ...Awareness call below are defined in the following.
# https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx
if sys.platform == 'win32':
- import ctypes
- PROCESS_SYSTEM_DPI_AWARE = 1
try:
+ import ctypes
+ PROCESS_SYSTEM_DPI_AWARE = 1
ctypes.OleDLL('shcore').SetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE)
- except (AttributeError, OSError):
+ except (ImportError, AttributeError, OSError):
pass
import tkinter.messagebox as tkMessageBox