Question: How to execute an EXE with Python?
Bela Evans
bevans at wested.org
Tue Aug 27 19:25:19 EDT 2002
You could spawn the exe program, for example:
import os
os.spawnv(os.P_NOWAIT, (r'C:/Progs/MyProg.EXE'), ('MyProg',))
Bela
"Fausto Arinos de A. Barbuto" <fbarbuto at telusplanet.net> wrote in message news:<MTCa9.10708$rn4.280649 at news1.telusplanet.net>...
> Hi everybody,
>
> I need to write a Python script to call and execute a DOS
> .EXE application. How do I do that? I know that there is
> os.execv(path, args) and similars, but can't get the right
> syntax. Suppose I have a C:/Progs/MyProg.EXE binary
> that I want to execute. What would then be the correct
> command?
>
> Thanks so much in advance,
>
> ---Fausto
More information about the Python-list
mailing list