aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/python/libghdl/__init__.py
blob: d36f58d9f08feeb4bade31de51504c2638840632 (plain)
1
2
3
4
5
6
7
8
9
10
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()