[Tutor] Re: os.system() problem executing application / program

Andrei project5 at redrival.net
Sat Apr 10 10:08:50 EDT 2004

mjekl at clix.pt wrote on Saturday 10 April 2004 16:02:
> On the other hand the following statement doesn't work:
>     os.system("start C:\Program Files\Internet Explorer\Iexplorer.exe")
> I'm as sure as I can be that this as something to do with either long file
> names or spaces in the dos command.

Spaces are a problem. Try putting double quotes around them, so:

   os.system('start "C:\Program Files\Internet Explorer\Iexplorer.exe"')

By the way, are you absolutely sure it's not "iexplore.exe"? (I'm not on
Windows now, so I can't check.) Also you don't really need the path at all,
just "iexplore" should work.

> If this is true this is not really a Python problem, but still is
> something
> probably alot of people encounter, so ther is probably a fast answer to my
> hair pulling problem :-)

No, it's all over Windows. If you look at shortcuts to the Program Files
folder you'll notice a lot of quoting too.



Real contact info (decode with rot13):
cebwrpg5 at jnanqbb.ay. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V ernq
gur yvfg, fb gurer'f ab arrq gb PP.

More information about the Tutor mailing list