How can I call a DLL from a scripting language?

后端 未结 5 1975
离开以前
离开以前 2020-12-31 15:37

I have a third-party product, a terminal emulator, which provides a DLL that can be linked to a C program to basically automate the driving of this product (send keystrokes,

5条回答
  •  迷失自我
    2020-12-31 16:40

    One way to call C libraries from Python is to use ctypes:

    >>> from ctypes import *
    >>> windll.user32.MessageBoxA(None, "Hello world", "ctypes", 0);
    

提交回复
热议问题