From 0b1a1855a954c06ef3f88b4e847b512cbd4b0d55 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 10 Dec 2023 13:13:07 +0300 Subject: [PATCH] Use full path for tdjson.dll in Python example. --- example/python/tdjson_example.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/python/tdjson_example.py b/example/python/tdjson_example.py index 001eb3875..9df81ea6d 100644 --- a/example/python/tdjson_example.py +++ b/example/python/tdjson_example.py @@ -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)