importing .dll in a python file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • moijes12

    importing .dll in a python file

    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!
  • Tim Golden

    #2
    Re: importing .dll in a python file

    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

    Comment

    • moijes12

      #3
      Re: importing .dll in a python file

      On Jul 11, 2:09 pm, Tim Golden <m...@timgolden .me.ukwrote:
      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

      Comment

      Working...