2012-08-07 29 views
5

我一直在使用這種模塊沒有問題,通過調用它:蟒蛇web瀏覽器

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

但就目前而言,我想選擇一個不同的瀏覽器,並根據文檔(HTTP://文檔。 python.org/library/webbrowser.html#webbrowser.get)我寫這

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

...我得到我無法錯誤擺脫:

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

關於它的任何想法?

回答

6

A Controller object不可調用。這樣做:

controller.open(url) 
+0

該死的,就是這樣!非常感謝! – alessandro 2012-08-09 07:13:57