FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 11-27-2007, 03:04 PM
Stéphane ANCELOT
 
Default python bug on gentoo with webbrowser module

I do not manage to solve this problem :

import webbrowser
webbrowser.open('http://www.python.org')


always open the following url in my firefox instead of www.python.org :
file:///home/steph/%22http://www.python.org%22
Best Regards
Steph
--
gentoo-user@gentoo.org mailing list
 
Old 11-28-2007, 12:53 PM
Benno Schulenberg
 
Default python bug on gentoo with webbrowser module

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?
What's in your webbrowser._browsers?


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:

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
--
gentoo-user@gentoo.org mailing list
 
Old 11-28-2007, 02:01 PM
Stéphane ANCELOT
 
Default python bug on gentoo with webbrowser module

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

--
gentoo-user@gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 10:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org