Possible Duplicate:
Python import dll
I am trying to load a c dll located at the same path where my .py script is, still I can not load the dll.
module = PyImport_ImportModule("<module-name.dll>");
Any suggestion.
Possible Duplicate:
Python import dll
I am trying to load a c dll located at the same path where my .py script is, still I can not load the dll.
module = PyImport_ImportModule("<module-name.dll>");
Any suggestion.
You must call the line below to set your current directory in path, that is because by default, the current directory is not in the search path:
PySys_SetPath(".");
mymod = PyImport_ImportModule("your_DLL_name or Py_module_name");
Once you have above code the C DLL or Python module will be loaded.