Message4763

Author Christof
Recipients Christof
Date 2009-05-30.12:56:34
SpamBayes Score 4.4894946e-06
Marked as misclassified No
Message-id <1243688195.07.0.133515211361.issue1361@psf.upfronthosting.co.za>
In-reply-to
Content
urllib.py uses os.path to find out which version to use for functions
pathname2url and url2pathname. So it checks os.path for values of 'mac',
'nt'or 'riscos'. 

As in Jython 2.5RC3 os.path == 'java' (I always thought sys.platform
should contain java and not os.path) urllib falls back to a very
simplified version to just quote or unquote a filename.

Result (simplified example):

Python: 
>>> u.pathname2url(os.path.abspath('a/b'))
'///c|/programs/a/b'

Jython 
>>> u.pathname2url(os.path.abspath('a/b'))
'c%3A%5Cprograms2%5Ca%5Cb'

which obviously is not working. There even is a module nturl2path but it
is not used to the above problem.

Basically urllib.pathname2url is not useful at all :(

So I guess wether os.name is wrong or urllib needs fixing? thanks for
any help.
History
Date User Action Args
2009-05-30 12:56:35Christofsetrecipients: + Christof
2009-05-30 12:56:35Christofsetmessageid: <1243688195.07.0.133515211361.issue1361@psf.upfronthosting.co.za>
2009-05-30 12:56:34Christoflinkissue1361 messages
2009-05-30 12:56:34Christofcreate