calling a .exe from Python

evidentemente.yo evidentemente.yo at gmail.com
Wed Jun 25 06:54:34 EDT 2008


Thank you for the help!!!:)


On 25 jun, 10:32, Nick Craig-Wood <n... at craig-wood.com> wrote:
> evidentemente.yo <evidentemente... at gmail.com> wrote:
> >  On 24 jun, 14:32, Nick Craig-Wood <n... at craig-wood.com> wrote:
> > > Probably what you want is this...
>
> > > from subprocess import call
>
> > > rc = call(["mypath/myfile.exe",arg1,arg2])
>
> > > rc will contain the exit status
>
> > > See the subprocess module for more things you can do
>
> >  Hey, thank you very much!!!:D
>
>


 >  Would it matter if my .exe doesn't return any value? would it
return
> >  like an "ok" or something???
>
> Your exe will return a value (it is part of the OS) but you can ignore
> it if you want.  Just use
>
> call(["mypath/myfile.exe",arg1,arg2])
>
> --
> Nick Craig-Wood <n... at craig-wood.com> --http://www.craig-wood.com/nick




More information about the Python-list mailing list