sorry..the program runs!
effbot at telia.com
Wed Mar 15 16:52:11 CET 2000
nathan <nnever50 at yahoo.com> wrote:
> I cannot do anything with the GUI until the process is ended.
> There's other ways?
the posted solution works, unless you forgot to
change P_WAIT to P_NOWAIT.
if you cannot figure out how to do that, here's
a second example (also from the eff-bot guide)
which works on Windows only. make sure you
call it as shown in the example:
def run(program, *args, **kw):
# find executable
mode = kw.get("mode", os.P_WAIT)
for path in string.split(os.environ["PATH"], os.pathsep):
file = os.path.join(path, program) + ".exe"
return os.spawnv(mode, file, (file,) + args)
raise os.error, "cannot find executable"
run("python", "hello.py", mode=os.P_NOWAIT)
## this prints:
## hello again, and welcome to the show
<!-- (the eff-bot guide to) the standard python library:
More information about the Python-list