INNER CODE UNIT · Python

GetUserEnvironmentVariable

Ershany/Arcane-Engine · Setup/ArcaneUtils.py:17

def GetUserEnvironmentVariable(name):
	key = winreg.CreateKey(winreg.HKEY_CURRENT_USER, r"Environment")
	try:
		return winreg.QueryValueEx(key, name)[0]
	except:
		return None

def DownloadFile(url, filepath):
	path = filepath
	filepath = os.path.abspath(filepath)
	os.makedirs(os.path.dirname(filepath), exist_ok=True)

	if type(url) is list:
		for url_option in url:
			print("Downloadng", url_option)
			try:
				DownloadFile(url_option, filepath)
				return

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…