urllib.urlopen("file://...") fails
Fernando Pérez
fperez528 at yahoo.com
Thu Apr 25 02:56:50 EDT 2002
Seth Delackner wrote:
> With python 2.2 on windows, with the file t:\tmp\package.html existing,
>
>>>> import urllib
>>>> u = urllib.urlopen("file://t:/tmp/package.html")
>
> Fails with the error below, but "file:t:/tmp/package.html" works. Is
> that even a valid url?
>
>>>> u = urllib.urlopen("file:///t:/tmp/package.html")
^
One / too many? You're directing it to \t:\.... which it obviously can't find.
I don't run windows so I can't test so I may be wrong. It just looks like that
is your problem.
Cheers,
f.
More information about the Python-list
mailing list