sorry..the program runs!

Fredrik Lundh effbot at
Wed Mar 15 16:52:11 CET 2000

nathan <nnever50 at> 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:


import os
import string

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)
        except os.error:
    raise os.error, "cannot find executable"

run("python", "", mode=os.P_NOWAIT)
print "goodbye"

## this prints:
## goodbye
## hello again, and welcome to the show


<!-- (the eff-bot guide to) the standard python library:

More information about the Python-list mailing list