[Tutor] os.system() start an application / program

orbitz at ezabel.com orbitz at ezabel.com
Thu Apr 15 07:53:29 EDT 2004


Look at the differences between the two lines, one has \\ the other doesn't.

You can just use a raw string and use \ if you want. See the tutorial for how to
use raw strings.


On Thu, 1 Apr 2004 19:21:10 +0100
"Miguel Lopes" <mjekl at iol.pt> wrote:

> Hi,
> 
> I'm experimenting with os.system() to start another application in my pc.
> I have no problems with the following statement:
> 
>     os.system("start C:\\MyDb1.mdb")
> 
> A command box appears/ desappears and Access starts running.
> 
> ***
> 
> 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.
> 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 :-)
> 
> I'm running Python2.3 on MSW98 2nd.
> 
> 
> Txs,
> Miguel
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list