only add dll directory on windows
This commit is contained in:
parent
1f20479af3
commit
3d50c6fe0b
1 changed files with 4 additions and 3 deletions
|
@ -167,9 +167,10 @@ def init_library():
|
||||||
abs_path = getabspath()
|
abs_path = getabspath()
|
||||||
|
|
||||||
#add all potential paths
|
#add all potential paths
|
||||||
os.add_dll_directory(dir_path)
|
if os.name=='nt':
|
||||||
os.add_dll_directory(abs_path)
|
os.add_dll_directory(dir_path)
|
||||||
os.add_dll_directory(os.getcwd())
|
os.add_dll_directory(abs_path)
|
||||||
|
os.add_dll_directory(os.getcwd())
|
||||||
handle = ctypes.CDLL(os.path.join(dir_path, libname))
|
handle = ctypes.CDLL(os.path.join(dir_path, libname))
|
||||||
|
|
||||||
handle.load_model.argtypes = [load_model_inputs]
|
handle.load_model.argtypes = [load_model_inputs]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue