Q: urlopen() and "file:///c:/mypage.html" ??

John J. Lee jjl at pobox.com
Fri Aug 22 10:50:10 EDT 2003


"Michael Geary" <Mike at DeleteThis.Geary.com> writes:
> > MAK wrote:
[...]
> > > If I were to use, say, Netscape to open this file, I'd specify it as
> > > "file:///c:/mypage.html", and it would open it just fine.  But
> > > urlopen() won't accept it as a valid URL. I get an OSError
> > > exception with the error message "No such file or directory:
> > > '\\C:\\mypage.html'".
[...]
> f = urllib2.urlopen( 'file:///c|/mypage.html' )

Why does Python use a different syntax to the rest of the Windows
world?


John




More information about the Python-list mailing list