From: nishi Date: Fri, 9 Feb 2024 05:27:25 +0000 (+0000) Subject: making one X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=7e7d8dcf393c1514fee31e49b921670fd773c58f;p=libw3.git making one git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@192 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Python/__init__.py b/Python/__init__.py new file mode 100644 index 0000000..7f7ba45 --- /dev/null +++ b/Python/__init__.py @@ -0,0 +1,25 @@ +" $Id$ " +import ctypes +import ctypes.util + +__all__ = ["w3", "libw3"] + +libpath = ctypes.util.find_library("w3") +if not(libpath): + raise Exception("LibW3 not found") + +class w3: + def __init__(self): + return + +libw3_loaded = ctypes.CDLL(libpath) + +libw3_loaded.W3_Do_Debug.argtypes = [ctypes.c_bool] + +class libw3: + @staticmethod + def init(): + libw3_loaded.W3_Library_Init() + @staticmethod + def debug(do): + libw3_loaded.W3_Do_Debug(do)