Re: Incompatibility bug for 1.1
Matej Cepl <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Organization | Northeastern University, Boston, MA |
| Message-ID | <[email protected]> |
will guaraldi wrote:
> Well, no. os.path.join will use the os.sep. In this case, I don't think
> we don't want to use os.sep. Instead we want to use the separator used
> for URIs which is / .
You are correct, of course. Then we have to do it ourselves, but in more
compatible way (this is from posixpath.py):
def join(a, *p):
"""Join two or more pathname components, inserting '/' as needed"""
path = a
for b in p:
if b[:1] == '/':
path = b
elif path == '' or path[-1:] == '/':
path = path + b
else:
path = path + '/' + b
return path
> I'm puzzled about rstrip, though.
see for yourself:
http://www.python.org/doc/2.1.3/lib/module-string.html
Matěj
--
Matej Cepl, http://www.ceplovi.cz/matej
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
This message has been composed of recycled electrons. None of
these electrons has been harmed or injured in the creation and
transmission of this message but they have been shamelessly
exploited for this use.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click