Python bindings tutorial

Terry Reedy tjreedy at
Tue Mar 16 21:10:22 CET 2010

On 3/16/2010 3:12 PM, Gabriel Genellina wrote:
> En Tue, 16 Mar 2010 13:20:40 -0300, Johny <python at> escribió:
>> Is there any tutorial how to write a bindings for a exe ( dos)
>> program?
>> I would like to run it from a Python directly
>> ( using import command and a particular function from the binding)
>> not using os.system command.
> Do you mean that you want to execute a particular function in the .exe
> program?
> That's not possible (ok, you *could* do that if you work hard enough,
> but that's not how things are usually done)

If running a function within the .exe *is* what you want, then you 
should compile to .dll instead of .exe and use swig or ctypes to do the 

More information about the Python-list mailing list