我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用pip.locations.USER_CACHE_DIR。
def __init__(self): self.statefile_path = os.path.join(USER_CACHE_DIR, "selfcheck.json") # Load the existing state try: with open(self.statefile_path) as statefile: self.state = json.load(statefile)[sys.prefix] except (IOError, ValueError, KeyError): self.state = {}