Mailing List Archive

Launching web browser programmatically
[.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@hotmail.com
Launching web browser programmatically [ In reply to ]
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@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
Launching web browser programmatically [ In reply to ]
If you have the win32 extensions, you can use win32api.ShellExecute()

Anything you can use after "start" you can pass to ShellExecute - ie, a URL,
a document file, .exe, etc.

Mark.

Ben Darnell wrote in message <3724EB92.248E7933@hotmail.com>...
>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
Launching web browser programmatically [ In reply to ]
Mark Hammond wrote:

> If you have the win32 extensions, you can use win32api.ShellExecute()
>
> Anything you can use after "start" you can pass to ShellExecute - ie, a URL,
> a document file, .exe, etc.
>
>

Thanks. That's just what I'm looking for.

Ben
Launching web browser programmatically [ In reply to ]
But how does one specify no scrollbars, no menus, the size of the window, etc.

Thanks,
Chris



In article <7g2rm1$t8i$1@m2.c2.telstra-mm.net.au>,
"Mark Hammond" <MHammond@skippinet.com.au> wrote:
> If you have the win32 extensions, you can use win32api.ShellExecute()
>
> Anything you can use after "start" you can pass to ShellExecute - ie, a URL,
> a document file, .exe, etc.
>
> Mark.
>
> Ben Darnell wrote in message <3724EB92.248E7933@hotmail.com>...
> >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
>
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own