Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue1057

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Incorrect URL with webbrowser and firefox under Gnome
Type:behaviorStage:
Components:Library (Lib)Versions:Python 2.5
process
Status:closedResolution:out of date
Dependencies:Superseder:
Assigned To:Nosy List: bingham, georg.brandl, orsenthil
Priority:normalKeywords:

Created on2007-08-29 15:02 bybingham, last changed2022-04-11 14:56 byadmin. This issue is nowclosed.

Messages (4)
msg55421 -(view)Author: Aaron Bingham (bingham)Date: 2007-08-29 15:02
Under Gnome, Firefox will open the wrong URL when launched bywebbrowser.  For example after running the following interactive session:bingham@grizzly:~> pythonPython 2.5.1 (r251:54863, Jun  6 2007, 13:42:30)[GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import webbrowser>>> webbrowser.open('http://www.python.org')TrueFirefox attempts to open the URLfile:///home/bingham/%22http://www.python.org%22.This is caused by a bug in the Python standard library's webbrowsermodule that only affects machines running Gnome.On Gnome, webbrowser runs the commandgconftool-2 -g /desktop/gnome/url-handlers/http/command 2>/dev/nullto find the web browser, which prints out a browser command line like/pkgs/Firefox/2.0/firefox "%s"The quotes around "%s" are preserved when passing the command-linearguments. The quotes prevent firefox from recognizing the URL andfirefox falls back to treating it as a file name. The webbrowser modulealready handles extra quoting around the URL for the BROWSER environmentvariable and this same treatment should be applied to the result ofgconftool-2.The BROWSER environment variable issue, now fixed, is described athttp://bugs.python.org/issue1684254.  The present issue was discussed inan Ubuntu bug report(https://bugs.launchpad.net/ubuntu/+source/python2.5/+bug/83974) but wasnot resolved.
msg55422 -(view)Author: Georg Brandl (georg.brandl)*(Python committer)Date: 2007-08-29 15:31
The current code in the 2.5 branch uses shlex.split to postprocess thecommand line returned by gconftool too, so this should be already fixed.
msg55458 -(view)Author: Senthil Kumaran (orsenthil)*(Python committer)Date: 2007-08-30 04:22
I am on Fedora Core 3, gnome 2.6 and I am unable to reproduce this issue.Could this be a Ubuntu configuration bug. Like adding " quotes after %sfor the firefox command?
msg55459 -(view)Author: Senthil Kumaran (orsenthil)*(Python committer)Date: 2007-08-30 04:23
Okay. I found the status later. It was fixed then with Python 2.6 whichI am using.
History
DateUserActionArgs
2022-04-11 14:56:26adminsetgithub: 45398
2007-08-30 04:23:04orsenthilsetmessages: +msg55459
2007-08-30 04:22:06orsenthilsetnosy: +orsenthil
messages: +msg55458
2007-08-29 15:31:52georg.brandlsetstatus: open -> closed
resolution: out of date
messages: +msg55422
nosy: +georg.brandl
2007-08-29 15:02:11binghamcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp