[Tutor] Any easy way to invoke the default browser on a specified URL?
Roel Schroeven
rschroev_nospam_ml at fastmail.fm
Tue May 10 09:57:47 CEST 2005
Kent Johnson wrote:
> Terry Carroll wrote:
>
>>Is there any way, from within Python, to cause the default browser
>>(Firefox, in my case) to be invoked with a specific URL?
>>
>>I'd like to do something like (totally made-up name and syntax):
>>
>>OpenBrowser("http://www.google.com/")
>>
>>and have a new browser window opened up pointing to Google.
>
>
> >>> import webbrowser
> >>> webbrowser.open("http://www.google.com/")
Splendid! I've been looking for something like that too, but somehow
that module escaped my attention. Thanks!
--
If I have been able to see further, it was only because I stood
on the shoulders of giants. -- Isaac Newton
Roel Schroeven
More information about the Tutor
mailing list