Calling DLLs from Python [Windows]

Jimmy Retzlaff jimmy at retzlaff.com
Wed Oct 8 05:30:27 EDT 2003


Georgy Pruss wrote:
>How can I call a function which is in a Windows DLL? For example,
...
>Google didn't help on this.

Google for ctypes, it makes simple calls very easy:

import ctypes
ctypes.windll.kernel32.Beep(100, 100)

You can also do much more complex things involving structures, pointers,
callbacks, etc. with a little more work.

Jimmy





More information about the Python-list mailing list