On Tue, 24 Nov 2009 02:23:19 +0100, Christian Heimes wrote:
> Gregory Ewing wrote:
>> ntpath.join('d:\\foo', '\\bar')
>>> '\\bar'
>>
>> This does seem like a bug, though -- the correct result
>> should really be 'd:\\bar', since that's what you would
>> get if you used the name '\\bar' with '
Christian Heimes wrote:
Gregory Ewing wrote:
ntpath.join('d:\\foo', '\\bar')
'\\bar'
This does seem like a bug, though -- the correct result
should really be 'd:\\bar', since that's what you would
get if you used the name '\\bar' with 'd:' as your current
drive.
No, it's not a bug. Since
Gregory Ewing wrote:
> ntpath.join('d:\\foo', '\\bar')
>> '\\bar'
>
> This does seem like a bug, though -- the correct result
> should really be 'd:\\bar', since that's what you would
> get if you used the name '\\bar' with 'd:' as your current
> drive.
No, it's not a bug. Since \bar is an ab
Jason R. Coombs wrote:
On Nov 20, 3:52 pm, Ethan Furman wrote:
It is often said on this list that 'Python is not Java'. It is also
true that 'Windows is not Unix'.
Unlike the *nix world where there is a *single* root, and everything
else is relative to that, in the Windows world there are se
On Nov 20, 3:52 pm, Ethan Furman wrote:
> It is often said on this list that 'Python is not Java'. It is also
> true that 'Windows is not Unix'.
>
> Unlike the *nix world where there is a *single* root, and everything
> else is relative to that, in the Windows world there are several roots
> -- e
Jason R. Coombs wrote:
In other words, paths without a drive letter are reported as absolute,
but treated as relative, except in a few special cases.
It's not clear what the result ought to be here, since
Windows drive-relative paths don't really fit into the
unix absolute/relative dichotomy.
Jason R. Coombs wrote:
The current implementation of Python (2.6.4, 3.1.1) treats \bar as a
relative path but reports it as an absolute path.
ntpath.isabs('\\bar')
True
ntpath.abspath('\\bar')
'C:\\bar'
os.chdir('d:\\')
ntpath.abspath('\\bar')
'd:\\bar'
os.chdir('server\\share'