From c88790b96b70bd6cb10b806978c34c42f2616e6f Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 3 Oct 2017 05:51:24 +0200 Subject: WIP: python binding to libghdl --- src/vhdl/python/libghdl/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/vhdl/python/libghdl/__init__.py (limited to 'src/vhdl/python/libghdl/__init__.py') diff --git a/src/vhdl/python/libghdl/__init__.py b/src/vhdl/python/libghdl/__init__.py new file mode 100644 index 000000000..d36f58d9f --- /dev/null +++ b/src/vhdl/python/libghdl/__init__.py @@ -0,0 +1,11 @@ +import ctypes +import sys + +dll_ext = {'linux': '.so', + 'linux2': '.so', + 'darwin': '.dylib', + 'win32': '.dll', + 'cygwin': '.dll'} + +libghdl = ctypes.CDLL("libghdl" + dll_ext.get(sys.platform, '.so')) +libghdl.libghdl_init() -- cgit v1.2.3