def getCookieJarPath(self): try: import mc #cookies = mc.GetCookieJar() cookies = os.path.join(mc.GetTempDir(), 'fs.ua.cookies.lwp') return cookies except: return os.path.join('', 'fs.ua.cookies.lwp')
def construct(self): """sets cache dir in temp folder""" id = mc.GetApp().GetId() prefix = "cache_" tmp = mc.GetTempDir() path = os.path.join(tmp, prefix + id) if not os.path.exists(path): os.makedirs(path) return path
def get_temp_file(filename): return os.path.join(mc.GetTempDir(), filename)