def getEnvironmentVariable(name):
    name = str(name)
n = ctypes.windll.kernel32.GetEnvironmentVariableW(name, None, 0)
if n == 0:
    pass
Problems with umlauts in python appdata environvent variable