How can I use a DLL file from Python?

前端 未结 7 1314
迷失自我
迷失自我 2020-11-22 16:06

What is the easiest way to use a DLL file from within Python?

Specifically, how can this be done without writing any additional wr

7条回答
  •  隐瞒了意图╮
    2020-11-22 16:26

    ctypes will be the easiest thing to use but (mis)using it makes Python subject to crashing. If you are trying to do something quickly, and you are careful, it's great.

    I would encourage you to check out Boost Python. Yes, it requires that you write some C++ code and have a C++ compiler, but you don't actually need to learn C++ to use it, and you can get a free (as in beer) C++ compiler from Microsoft.

提交回复
热议问题