]> Nishi Git Mirror - libw3.git/commitdiff
making one
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Fri, 9 Feb 2024 05:27:25 +0000 (05:27 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Fri, 9 Feb 2024 05:27:25 +0000 (05:27 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@192 d27a3e52-49c5-7645-884c-6793ebffc270

Python/__init__.py [new file with mode: 0644]

diff --git a/Python/__init__.py b/Python/__init__.py
new file mode 100644 (file)
index 0000000..7f7ba45
--- /dev/null
@@ -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)