How to load the DLL with PyRun_SimpleString?

Discussion in 'Python' started by Link, Sep 23, 2003.

  1. Link

    Link Guest

    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
     
    Link, Sep 23, 2003
    #1
    1. Advertising

  2. Link

    Syver Enstad Guest

    "Link" <> 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
     
    Syver Enstad, Sep 23, 2003
    #2
    1. Advertising

  3. Link

    Link Guest

    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

    "Syver Enstad" <>
    ???????:...
    > "Link" <> 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
     
    Link, Sep 23, 2003
    #3
  4. Link

    Syver Enstad Guest

    "Link" <> writes:

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


    Rename the .dll to .pyd.

    --

    Vennlig hilsen

    Syver Enstad
     
    Syver Enstad, Sep 23, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,996
  2. Søren Johansen

    PyRun_SimpleString, PyRun_File

    Søren Johansen, Aug 5, 2003, in forum: Python
    Replies:
    0
    Views:
    908
    Søren Johansen
    Aug 5, 2003
  3. Stavros Tsolakos

    Re: PyRun_SimpleString, PyRun_File

    Stavros Tsolakos, Aug 6, 2003, in forum: Python
    Replies:
    0
    Views:
    483
    Stavros Tsolakos
    Aug 6, 2003
  4. iwl
    Replies:
    2
    Views:
    727
    Gabriel Genellina
    Dec 7, 2006
  5. iwl
    Replies:
    0
    Views:
    340
Loading...

Share This Page