Use full path for tdjson.dll in Python example.

This commit is contained in:
levlam 2023-12-10 13:13:07 +03:00
parent 745c40855a
commit 0b1a1855a9
1 changed files with 2 additions and 1 deletions

View File

@ -8,10 +8,11 @@
from ctypes.util import find_library
from ctypes import *
import json
import os
import sys
# 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:
sys.exit("Can't find 'tdjson' library")
tdjson = CDLL(tdjson_path)