Prev: cycling through options
Next: Timer
From: Johny on 16 Mar 2010 12:20 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. Thanks L.
From: Joaquin Abian on 16 Mar 2010 14:13 On Mar 16, 5:20 pm, Johny <pyt...(a)hope.cz> wrote: > 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. > Thanks > L. subprocess ?
From: Joaquin Abian on 16 Mar 2010 14:14 On Mar 16, 5:20 pm, Johny <pyt...(a)hope.cz> wrote: > 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. > Thanks > L. subprocess ?
From: Gabriel Genellina on 16 Mar 2010 15:12 En Tue, 16 Mar 2010 13:20:40 -0300, Johny <python(a)hope.cz> 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) -- Gabriel Genellina
From: Terry Reedy on 16 Mar 2010 16:10
On 3/16/2010 3:12 PM, Gabriel Genellina wrote: > En Tue, 16 Mar 2010 13:20:40 -0300, Johny <python(a)hope.cz> 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 binding. |