-
-
Save matham/f6a07f8fb5e403feb440 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from os.path import dirname, join, isdir | |
import ctypes | |
from ctypes import wintypes | |
# See https://github.com/numpy/numpy/wiki/windows-dll-notes#python-dlls | |
# and https://pytools.codeplex.com/workitem/1627 | |
try: | |
_AddDllDirectory = ctypes.windll.kernel32.AddDllDirectory | |
_AddDllDirectory.argtypes = [wintypes.c_wchar_p] | |
# Needed to initialize AddDllDirectory modifications | |
ctypes.windll.kernel32.SetDefaultDllDirectories(0x1000) | |
except AttributeError: | |
_AddDllDirectory = ctypes.windll.kernel32.SetDllDirectoryW | |
_AddDllDirectory.argtypes = [wintypes.c_wchar_p] | |
_AddDllDirectory(sdl2\bin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment