Use full path for tdjson.dll in Python example.
This commit is contained in:
parent
745c40855a
commit
0b1a1855a9
@ -8,10 +8,11 @@
|
|||||||
from ctypes.util import find_library
|
from ctypes.util import find_library
|
||||||
from ctypes import *
|
from ctypes import *
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# load shared library
|
# load shared library
|
||||||
tdjson_path = find_library('tdjson') or 'tdjson.dll'
|
tdjson_path = find_library('tdjson') or os.path.join(os.path.dirname(__file__), 'tdjson.dll')
|
||||||
if tdjson_path is None:
|
if tdjson_path is None:
|
||||||
sys.exit("Can't find 'tdjson' library")
|
sys.exit("Can't find 'tdjson' library")
|
||||||
tdjson = CDLL(tdjson_path)
|
tdjson = CDLL(tdjson_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user