Answers for "python get user home directory"

3

python get user home directory

from os.path import expanduser
home = expanduser("~")
Posted by: Guest on August-11-2020
1

python get user home directory

from pathlib import Path
home = str(Path.home())
Posted by: Guest on August-11-2020

Code answers related to "python get user home directory"

Python Answers by Framework

Browse Popular Code Answers by Language