Introduce tostring function

This commit is contained in:
Nicolas Duhamel 2011-04-11 19:53:25 +02:00 committed by Romain Bignon
commit 0f53a02947
2 changed files with 7 additions and 2 deletions

View file

@ -54,3 +54,8 @@ class Path(object):
def get(self):
return copy.copy(self._working_path)
def tostring(self):
escape = lambda s: s.replace('/', '\/')
path = map(escape, self._working_path)
return '/' + '/'.join(path)