programming 101: know the library, use the library

This commit is contained in:
Faik Uygur
2008-11-11 12:30:16 +00:00
parent 39c388e581
commit 011efe4292
2 changed files with 1 additions and 6 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ class URI(object):
return not self.is_local_file()
def is_absolute_path(self):
return util.absolute_path(self.__path)
return os.path.isabs(self.__path)
def is_relative_path(self):
return not self.is_absolute_path()
-5
View File
@@ -222,11 +222,6 @@ def removepathprefix(prefix, path):
else:
return ""
def absolute_path(path):
"""Determine if given path is absolute."""
comps = splitpath(path)
return comps[0] == ''
def join_path(a, *p):
"""Join two or more pathname components.