[Tutor] list index out of range error

VanL vlindberg@verio.net
Tue, 20 Mar 2001 16:26:07 -0700


> And another thing:
>
> import os
> os.system('notepad.exe')
>
> works fine, while
>
> import os
> os.system ('iexplore.exe')
>
> does not. Is there  a path problem here?

Yep, path problem.  Notepad.exe is in the \windows directory, which is in the
search path.  Strange as it may seem, \Program Files is not.

This works:
 os.system('\\Progra~1\\Intern~1\\IEXPLORE.EXE')

(Using dos filenames to get around the unescapable spaces in directory names)

VanL