def get_temporary_dirs(self): # First try the GConf temporary dir, then try the system TEMP dir # finally try on the HOME temps = (self.temporary_dir, TEMP_DIR, HOME_DIR) for temp in temps: if urlutil.is_local(temp) and _is_dir_writable(temp): yield urlutil.get_path(temp)
def is_local(self, filename): return urlutil.is_local(filename)