After tests found: Python can not use "~" Get Ubuntu system's user directory,
Test code is as follows:
if os.path.isdir("~"):
print("exists")
After tests found: Python can not use "~" Get Ubuntu system's user directory,
Test code is as follows:
if os.path.isdir("~"):
print("exists")