Python webbrowser

I use this module without problems, calling it as:

webbrowser.open("http link...")

now, however, I wanted to choose a different browser, and according to the docs (http://docs.python.org/library/webbrowser.html#webbrowser.get) I wrote this

controller = webbrowser.get('firefox')
controller("http link...")

... and I get an error that I cannot get rid of:

Exception in Tkinter callback
Traceback (most recent call last):
....
TypeError: 'Mozilla' object is not callable

any idea about this ???

+5
source share
1 answer

A The controller object cannot be called. Do it:

controller.open(url)
+6
source

All Articles