How to load the DLL with PyRun_SimpleString?

Syver Enstad syver-en+usenet at online.no
Tue Sep 23 11:16:12 CEST 2003


"Link" <link0937 at hotmail.com> writes:

> Hi,
> 
> Have anyone know how to import the DLL in C program?
> 
> 
> Actually, I have used the statement 'PyRun_SimpleString' to import
> .PY,
> 
> 
> Such as,
> r = PyRun_SimpleString("import os");
> It's be fine.
> 
> 
> If importing the DLL by this commdand,
> 
> Such as,
> r = PyRun_SimpleString("import example");
> 
> return the error code -1.

Is the .dll named .pyd? Is the .pyd on your sys.path?
 

-- 

Vennlig hilsen 

Syver Enstad




More information about the Python-list mailing list