How to load the DLL with PyRun_SimpleString?

L

Link

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.


Should any advice, let me know whatever you try...

Thanks in advance.
Link
 
S

Syver Enstad

Link said:
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?
 
L

Link

Exactelly, the named example is .DLL and put it on the sys.path.

That I had check it carefully.
But the result make me sad what I failed to load.

Could you give me more advice? Such as the other statement for loading DLL
as same as the 'PyRun_SimpleString' command.

Regards,
Link
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top