From 7e7d8dcf393c1514fee31e49b921670fd773c58f Mon Sep 17 00:00:00 2001 From: nishi Date: Fri, 9 Feb 2024 05:27:25 +0000 Subject: [PATCH] making one git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@192 d27a3e52-49c5-7645-884c-6793ebffc270 --- Python/__init__.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Python/__init__.py 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) -- 2.43.0