This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients
Date 2005-12-06.23:38:10
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=44345

All I'm saying is that if this form

    webbrowser.open("/tmp/foo.html")

was supported in Python 2.4, possibly by recognizing the bare
path and silently pretending the programmer wrote

    webbrowser.open("file://localhost/tmp/foo.html")

then it ought to do the same in 2.5 unless you intend to break
existing applications.  How hard can it be to recognize that
the first character of the "url" is "/" and prepend "file://localhost/"
before passing it along to the user's chosen browser?

I suggest compatibility with urllib.urlopen is desirable:

>>> f = urllib.urlopen("/etc/hosts")
>>> f.read()
"##\n# Host Database\n# \n# Note that this file is consulted when the 
system is running in single-user\n# mode.  At other times this information is 
handled by lookupd.  By default,\n# lookupd gets information from NetInfo, 
so this file will not be consulted\n# unless you have changed lookupd's 
configuration.\n#\n# localhost is used to configure the loopback interface\n# 
when the system is booting.  Do not change this 
entry.\n##\n127.0.0.1\tlocalhost 
montanaro.dyndns.org\n255.255.255.255\tbroadcasthost\n"

Skip
History
Date User Action Args
2007-08-23 14:35:49adminlinkissue1338995 messages
2007-08-23 14:35:49admincreate