importing .dll in a python file

Discussion in 'Python' started by moijes12, Jul 11, 2008.

  1. moijes12

    moijes12 Guest

    Hi

    I need to use a .dll from a python script.I have installed pywin.But
    in the program ,which is like:

    import dllName

    I get :

    Import Error : DLL not found

    Please suggest a solution!
     
    moijes12, Jul 11, 2008
    #1
    1. Advertising

  2. moijes12

    Tim Golden Guest

    moijes12 wrote:
    > I need to use a .dll from a python script.I have installed pywin.But
    > in the program ,which is like:
    >
    > import dllName
    >
    > I get :
    >
    > Import Error : DLL not found
    >
    > Please suggest a solution!



    Well, the short answer is: use the ctypes module.

    The longer answer is: read around the subject a
    bit before you expect Python to import an arbitrary
    DLL and then give up when it doesn't :)

    TJG
     
    Tim Golden, Jul 11, 2008
    #2
    1. Advertising

  3. moijes12

    moijes12 Guest

    On Jul 11, 2:09 pm, Tim Golden <> wrote:
    > moijes12 wrote:
    > > I need to use a .dll from a python script.I have installed pywin.But
    > > in the program ,which is like:

    >
    > > import dllName

    >
    > > I get :

    >
    > > Import Error : DLL not found

    >
    > > Please suggest a solution!

    >
    > Well, the short answer is: use the ctypes module.
    >
    > The longer answer is: read around the subject a
    > bit before you expect Python to import an arbitrary
    > DLL and then give up when it doesn't :)
    >
    > TJG


    Thanks a lot Tim.

    moijes12
     
    moijes12, Jul 11, 2008
    #3
    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,854
  2. plb
    Replies:
    2
    Views:
    359
  3. John D Salt
    Replies:
    1
    Views:
    609
    Larry Bates
    May 31, 2006
  4. Replies:
    2
    Views:
    529
    Larry Bates
    Mar 9, 2007
  5. H. Simpson
    Replies:
    4
    Views:
    308
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page