Python bindings tutorial

Stefan Behnel stefan_ml at behnel.de
Wed Mar 17 05:36:29 EDT 2010


MikeLisanke at gmail.com, 17.03.2010 10:08:
> Its interesting you've mentioned the hard work involved in this
> interface (binding to an EXE instead of a DLL). A year or more ago I
> was looking at interfacing IPMITOOL to python. Do to the problems
> incurred with swig/python I switched to a running the process through
> its command-line interface. I always felt the problems in interfacing
> python to an EXE should be worked on (to minimize them), making the
> direct use of an EXE API's a routine task. I understand some of the
> problems using an EXE (not running all of its startup code   but
> enough for its proper operation). Have you found this a recurring
> question? Thanks.

I think the point here is that executable binaries are not supposed to be 
used as libraries. Libraries are. That's the difference between a DLL and 
an executable in the first place. To run an executable, execute it. The 
subprocess module is the tool of choice here. To use a DLL, link against it.

Stefan




More information about the Python-list mailing list