def __init__(self, path=None, create=False): def pool_realpath(p): return join(realpath(p), ".pool") def get_default_path(create): path_cwd = os.getcwd() path_env = os.environ.get("POOL_DIR") or path_cwd if create: if isdir(pool_realpath(path_env)): return path_cwd else: return path_env else: if isdir(pool_realpath(path_cwd)): return path_cwd else: return path_env if path is None: path = get_default_path(create) path = pool_realpath(path) Paths.__init__(self, path)
def __init__(self, path=None): path = join(dirname(realpath(path)), ".deck") Paths.__init__(self, path)
def __init__(self, backup_root=None): if backup_root is None: backup_root = '/' Paths.__init__(self, join(backup_root, self.PATH))
def __init__(self, path=None): if path is None: path = self.PATH Paths.__init__(self, path)