diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-10-03 05:51:24 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-10-03 05:51:24 +0200 |
commit | c88790b96b70bd6cb10b806978c34c42f2616e6f (patch) | |
tree | 6ab8f938b3f7731686dc84de476de6ad37c51587 /src/vhdl/python/libghdl/__init__.py | |
parent | 4e05204aa6fc73e440196bcc9be14cf2e1b9b6a4 (diff) | |
download | ghdl-c88790b96b70bd6cb10b806978c34c42f2616e6f.tar.gz ghdl-c88790b96b70bd6cb10b806978c34c42f2616e6f.tar.bz2 ghdl-c88790b96b70bd6cb10b806978c34c42f2616e6f.zip |
WIP: python binding to libghdl
Diffstat (limited to 'src/vhdl/python/libghdl/__init__.py')
-rw-r--r-- | src/vhdl/python/libghdl/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
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() |