A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-June/015321.html below:

[Python-Dev] urllib2

[Python-Dev] urllib2 [Python-Dev] urllib2Gordon McMillan gmcm@hypernet.com
Thu, 7 Jun 2001 09:06:55 -0400
[Tim & Paul on file URLs]

[Tim]
> But on Windows, urllib2.urlopen() throws up even on URLs like:
> 
>     file:///c:/bootlog.txt

Curiously enough,
  url = "file:///" + urllib.quote_plus(fnm)
seems to work on Windows. It even seems to work on mac, if 
you first turn '/' into '%2f', then undo the double quoting (turn 
'%252f' back into '%2f' in the ensuing url).

It even seems to work on mac directory names with Unicode 
characters in them (though I haven't looked too closely, in fear 
of jinxing it).

eye-of-newt-considered-helpful-ly y'rs


- Gordon



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4