1 |
Stéphane ANCELOT wrote: |
2 |
> import webbrowser |
3 |
> webbrowser.open('http://www.python.org') |
4 |
|
5 |
Works fine for me, opens the site in Firefox. |
6 |
|
7 |
What version of Python? |
8 |
What's in your webbrowser._browsers? |
9 |
|
10 |
|
11 |
Python 2.4.4 (#1, Nov 9 2007, 16:26:42) |
12 |
|
13 |
>>> webbrowser._browsers |
14 |
{'kfm': [<class webbrowser.Konqueror at 0xb7bfc68c>, |
15 |
<webbrowser.Konqueror instance at 0xb7c0054c>], 'links': [None, |
16 |
<webbrowser.GenericBrowser instance at 0xb7c003cc>], 'lynx': [None, |
17 |
<webbrowser.GenericBrowser instance at 0xb7c0048c>]} |
18 |
|
19 |
There's no Firefox in there, but it is marked as default browser |
20 |
somewhere in KControl. |
21 |
|
22 |
When doing: |
23 |
|
24 |
webbrowser.register("firefox", None, webbrowser.Netscape("firefox")) |
25 |
webbrowser._browsers['firefox'][1].open('http://www.python.org') |
26 |
|
27 |
it opens two Firefoxes, and opens the site in a second tab of the |
28 |
first window. Strange. |
29 |
|
30 |
Benno |
31 |
-- |
32 |
gentoo-user@g.o mailing list |