[patch] Path conversion generalization
John A Meinel
john at arbash-meinel.com
Fri Jan 27 21:38:11 GMT 2006
Jan Hudec wrote:
> Hello,
>
> Could someone please try following patch on Windows? I don't have one handy
> and I might not have time to try it on when I am at work.
>
> It slightly improves the path conversion by using os.path.sep instead of
> hardcoding \ for win32. I don't think python is going to run on OS/2 (also
> uses \ IIRC), old MacOS (IIRC used :) or, horrors, VMS, but it's still
> a little cleaner.
>
I would actually use 'os.sep', since 'os.path.sep' looks like
'os.pathsep' (and yes there is os.path.pathsep).
I'm not sure if osutils.splitpath() needs to use '\\' anymore, because
all of the internal strings should be '/' anyway.
Also, I think if we were on VMS we would have to worry about a lot more
anyway (Windows will let you access paths with a forward slash, I doubt
VMS would). So I think you are prematurely generalizing.
But I can make sure the tests still pass (if they pass on win32 anyway,
not all of them do right now).
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060127/2965bc2d/attachment.pgp
More information about the bazaar
mailing list