Benno Schulenberg a écrit :
> Stéphane ANCELOT wrote:
>> import webbrowser
>> webbrowser.open('http://www.python.org')
> 
> Works fine for me, opens the site in Firefox.
> 
> What version of Python?
v2.5
> What's in your webbrowser._browsers?

this is :
 Python 2.5.1 (r251:54863, Nov 19 2007, 10:54:31)
[GCC 4.1.2 (Gentoo 4.1.2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser
>>> webbrowser._browsers
{'konqueror': [<class 'webbrowser.Konqueror'>, <webbrowser.Konqueror
object at 0xb7b061ac>], 'firefox': [None, <webbrowser.Mozilla object at
0xb7b0612c>], 'gnome': [None, <webbrowser.BackgroundBrowser object at
0xb7b0606c>], 'links': [None, <webbrowser.GenericBrowser object at
0xb7b0626c>], 'opera': [None, <webbrowser.Opera object at 0xb7b0622c>],
'seamonkey': [None, <webbrowser.Mozilla object at 0xb7b0614c>],
'epiphany': [None, <webbrowser.Galeon object at 0xb7b0616c>], 'lynx':
[None, <webbrowser.GenericBrowser object at 0xb7b062ec>]}
>>> 


> Python 2.4.4 (#1, Nov  9 2007, 16:26:42)
> 
>>>> webbrowser._browsers
> {'kfm': [<class webbrowser.Konqueror at 0xb7bfc68c>, 
> <webbrowser.Konqueror instance at 0xb7c0054c>], 'links': [None, 
> <webbrowser.GenericBrowser instance at 0xb7c003cc>], 'lynx': [None, 
> <webbrowser.GenericBrowser instance at 0xb7c0048c>]}
> 
> There's no Firefox in there, but it is marked as default browser 
> somewhere in KControl.
> 
> When doing:

This works :

> webbrowser.register("firefox", None, webbrowser.Netscape("firefox"))
> webbrowser._browsers['firefox'][1].open('http://www.python.org')
> 
> it opens two Firefoxes, and opens the site in a second tab of the 
> first window.  Strange.
> 
> Benno

-- 
[EMAIL PROTECTED] mailing list

Reply via email to