Launching web browser programmatically

William Park parkw at better.net
Mon Apr 26 18:34:28 EDT 1999


On Mon, Apr 26, 1999 at 05:41:22PM -0500, Ben Darnell wrote:
> [I seem to remember a recent thread about this, but I can't find it on
> DejaNews.  I apologize for any redundancy]
> 
> How do I launch the the user's web browser programmatically on Win9x?  I
> can use "start http://www.python.org" at the command line, but
> "os.system('start http://www.python.org')" doesn't work properly.  The
> python process seems to hang.  When I kill python with the task manager,
> the web browser does appear.  What is going wrong here?
> 
> Ben Darnell
> ben_darnell at hotmail.com
> 
> 
> -- 
> http://www.python.org/mailman/listinfo/python-list

Not knowing too much about Win9x, my guess would be that os.system()
is waiting for stdin to close, since the web browser does appear after
you kill python.  Try Window's equivalent to
    os.system('start http://www.python.org </dev/null 1>/dev/null 2>/dev/null &')

William Park




More information about the Python-list mailing list