I have a Python module, wrapper.py, that wraps a C DLL. The DLL lies in the same folder as the module. Therefore, I use the following code to load it:
wrapper.py
Another version:
dll_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'MyCDLL.dll') myDll = ctypes.CDLL(dll_file)