[Python-Dev] urllib2/urllib incompatibility? (original) (raw)
Vinay Sajip vinay_sajip at yahoo.co.uk
Mon May 24 12:00:07 CEST 2010
- Previous message: [Python-Dev] urllib2/urllib incompatibility?
- Next message: [Python-Dev] variable name resolution in exec is incorrect
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Senthil Kumaran <orsenthil gmail.com> writes:
The actual (and Valid) file:// url in your case is 'file:///tmp/hello.txt' And this was fine and consistent. The extra '/' is making it in invalid url in urllib2, I think that be tracked as bug at least to show a consistent behaviour. The local file open methods of urllib2 and urllib are different.
Yes, it seems to be a bug in urllib which permits an invalid URL to pass. I came across it by accident, I normally use urls like file://localhost/tmp/hello.txt so I don't trip over the /// hurdles :-)
I'll raise an issue on the tracker.
Regards,
Vinay Sajip
- Previous message: [Python-Dev] urllib2/urllib incompatibility?
- Next message: [Python-Dev] variable name resolution in exec is incorrect
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]