0

I need to use Dll from python using ctypes but I read the tutorial and I don´t understand anything!!

I wants to load the dll from path and access to its functions...

SOS!!

Thanks

1 Answer 1

3
import ctypes
foo = ctypes.CDLL("/path/to/library")
foo.function_name()

You should maybe look for a better tutorial. Here is one: http://python.net/crew/theller/ctypes/tutorial.html

3
  • Ok Thanks I try it again. But now, what can I use *.lib with python?? The code isn´t the same no? Thank you
    – igferne
    Aug 22, 2010 at 23:43
  • Sorry, can you rephrase the question?
    – nisc
    Aug 23, 2010 at 11:08
  • yes, sorry my english is horrible!! I´ve 2 problems: ->I try to load dll with this code: f = ctypes.CDLL("vix.dll") and it returns can find the specific module... ->I need add use in python script functions contained in "AllProducts.lib"
    – igferne
    Aug 23, 2010 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.