From: Christof <re...@bu...> - 2009-05-30 12:56:43
|
New submission from Christof <ct...@gm...>: 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. ---------- components: Library messages: 4763 nosy: Christof severity: normal status: open title: urllib.pathname2url not working: os.path == 'java' but should not be? versions: 25b3 _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue1361> _______________________________________ |