How to lanch a webbrowser

python at hope.cz python at hope.cz
Thu Jan 20 15:08:35 EST 2005


Steve Holden wrote:
> Ola Natvig wrote:
>
> > export at hope.cz wrote:
> >
> >> Does anyone know
> >> how to lanch a webbrowser ( from Python) without menu and
toolbars?
> >> Thanks for help
> >> Lad
> >>
> >
> > You've got the webbrowser module which lauches the OS's standard
browser
> >
> > from webbrowser import get
> > get("www.example.org")
> >
> > launches the webbrowser, but how to launch it without menu and
toolbar I
> > don't know. You could launch a small HTML page containing a
javascript
> > that launches your wanted page.
> >
> This would indeed be the best way. The page you launched should
contain
> a script that creates another window. Since this would be
browser-based
> javascript, it could specify the appropriate browser window
attributes
> (see, for example
>
>    http://www.javascripter.net/faq/openinga.htm
>
> which shows you how to specify the appropriate window
characteristics).
>
> The onload attribute of the first page's body could then specify
closing
> the window you opened from Python.
>
> You may find that this close operation generates a warning from the
> browser about scripts doing naughty things, however.
>
> regards
>   Steve
> --
> Steve Holden               http://www.holdenweb.com/
> Python Web Programming  http://pydish.holdenweb.com/
> Holden Web LLC      +1 703 861 4237  +1 800 494 3119

Thank you Steve for the http link( was good) and to you all others as
well who helped me.
Lad




More information about the Python-list mailing list