aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-10-16 11:19:43 +1100
committerNeil <nyamatongwe@gmail.com>2019-10-16 11:19:43 +1100
commita68962b67be1033d4963835c80c37310070380ac (patch)
tree1da019cf3424d3f0dacf336c3eecf84a9d8dd16d
parent42b0101eb7cf6efb2474c40d47f05fc40f3e3a7e (diff)
downloadscintilla-mirror-a68962b67be1033d4963835c80c37310070380ac.tar.gz
Call LoadLibrary with DLL path as Python 3.8 doesn't look for DLLs in PATH.
-rw-r--r--test/XiteWin.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/XiteWin.py b/test/XiteWin.py
index ba41afac9..398c9a525 100644
--- a/test/XiteWin.py
+++ b/test/XiteWin.py
@@ -25,8 +25,6 @@ sys.path.append(scintillaScriptsDirectory)
import Face
scintillaBinDirectory = os.path.join(scintillaDirectory, "bin")
-os.environ['PATH'] = os.environ['PATH'] + ";" + scintillaBinDirectory
-#print(os.environ['PATH'])
WFUNC = ctypes.WINFUNCTYPE(c_int, HWND, c_uint, WPARAM, LPARAM)
@@ -183,9 +181,9 @@ class XiteWin():
def OnCreate(self, hwnd):
self.win = hwnd
- # Side effect: loads the DLL
try:
- x = ctypes.windll.SciLexer.Scintilla_DirectFunction
+ scintillaDLLPath = os.path.join(scintillaBinDirectory, "SciLexer.DLL")
+ ctypes.cdll.LoadLibrary(scintillaDLLPath)
except OSError:
print("Can't find SciLexer.DLL")
print("Python is built for " + " ".join(platform.architecture()))