Skip to content

Commit

Permalink
Merge pull request oaubert#132 from pjeanjean/master
Browse files Browse the repository at this point in the history
python: Fix dll not found on Python 3.8+
  • Loading branch information
oaubert authored Apr 29, 2020
2 parents c1a2e0a + e1d2bc8 commit b1a44ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generator/templates/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ def find_lib():
p = os.getcwd()
os.chdir(plugin_path)
# if chdir failed, this will raise an exception
dll = ctypes.CDLL(libname)
dll = ctypes.CDLL('.\\' + libname)
# restore cwd after dll has been loaded
os.chdir(p)
else: # may fail
dll = ctypes.CDLL(libname)
dll = ctypes.CDLL('.\\' + libname)
else:
plugin_path = os.path.dirname(p)
dll = ctypes.CDLL(p)
Expand Down

0 comments on commit b1a44ed

Please sign in to comment.