On Sun, 9 Nov 2003 11:32:46 -0800, "Ben Allfree" <be****@bldigital.com> wrote:
The docs for os.path.isabs() state:
isabs( path)
Return True if path is an absolute pathname (begins with a slash).
This is false becase os.path.isabs("C:\\foo") == True
It should read:
isabs( path)
Return True if path is an absolute pathname (begins with a slash or drive
letter).
While you're at it, better take this into account also ;-)
import os
os.path.isabs("C:\\foo")
True os.path.isabs("C:foo")
False os.path.isabs("\\foo")
True
For that last one, I think you could argue that it's false, since it does not
absolutely specify what the meaning is in a multi-drive system.
The whole drive letter file path thing is soo lame it makes me incoherent ;-/
Regards,
Bengt Richter