tmp = str(os.path.expandvars('$TMP'))
import ctypes
GetLongPathName = ctypes.windll.kernel32.GetLongPathNameW
buffer = ctypes.create_unicode_buffer(GetLongPathName(tmp, 0, 0))
compare two windows paths, one containing tilde, in python