# HG changeset patch # User paulb # Date 1168115391 0 # Node ID 67356ca8b07b1d47c1a6e2d287c9320f44bfef49 # Parent fdc01f879edf2e69c267fbcf80226af7ce4a72b6 [project @ 2007-01-06 20:29:51 by paulb] Added a traverse_path method. diff -r fdc01f879edf -r 67356ca8b07b WebStack/Generic.py --- a/WebStack/Generic.py Sat Jan 06 20:29:37 2007 +0000 +++ b/WebStack/Generic.py Sat Jan 06 20:29:51 2007 +0000 @@ -677,6 +677,18 @@ # Utility methods. + def traverse_path(self, encoding=None): + + """ + Traverse the path, updating the virtual path info and thus the processed + virtual path info accordingly. Return the traversed virtual path info + fragment. + """ + + vp = self.get_virtual_path_info(encoding).split("/") + self.set_virtual_path_info("/" + "/".join(vp[2:])) + return vp[1] + def update_path(self, path, relative_path): """