Levi Nie wrote:

> how can i register the non-default browser with the webbrowser module?
> 
> the case:
> i want open a site such as "google.com" in ie8 with the python.But my
> default is chrome.
> so i want to register a ie8 controller with the
> webbrowser.register(*name*, *constructor*[, *instance*]).
> so what does the parameter "constructor" "instance" mean?
> how can i do it?

Isn't there already a controller for ie8? I can't check, but you can list 
the available browsers with

>>> import webbrowser
>>> list(webbrowser._browsers)
['x-www-browser', 'kfmclient', 'firefox', 'konqueror']

Then if you want to open a page with a specific browser just do

url = "http://www.python.org";
browser = "firefox"
webbrowser.get(browser).open(url)


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to