os.system(cmd) isn't working
Gregory PiƱero
gregpinero at gmail.com
Thu Jun 23 14:38:15 EDT 2005
Thanks to everyone for all the help! After careful consideration I
decided to go with os.startfile(url)
It works just great!
Here's my program in case anyone's interested. 5 points if you can
guess what it does ;-)
"""Take a filepath from stdin and translate to the corresponding url and
open up browser and show it."""
import sys
import os
myhtmlroot='C:\\Documents and Settings\\Gregory\\My
Documents\\blendedtechnologies\\trunk'
htmlroot='http://www.blendedtechnologies.com'
filepath=sys.argv[1]
filename=os.path.basename(filepath)
filedir=os.path.dirname(filepath).replace(myhtmlroot,'').replace('\\','/')
url=htmlroot+'/'+filedir+'/'+filename
os.startfile(url)
-Greg
On 23 Jun 2005 10:04:32 -0700, drobinow at gmail.com <drobinow at gmail.com> wrote:
> If firefox is not your default browser,
> os.system(r'"cd c:\Program Files\Mozilla Firefox & firefox "' +
> '"www.blendertechnologies.com "')
>
> works for me.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list