'Takes one path portion (delineated by slashes) from the
path_info, and appends it to the script_name.  Returns
the path segment.'

def path_info_pop(self):

    path_info = self.path_info
    if ((not path_info) or (not path_info.startswith('/'))):
        return None
    try:
        slash_loc = path_info.index('/', 1)
    except ValueError:
        slash_loc = len(path_info)
    self.script_name += path_info[:slash_loc]
    self.path_info = path_info[slash_loc:]
    return path_info[1:slash_loc]
