I would like to use Python to create a directory on Linux (i.e. ~/mydir/). I tried this...
from pathlib import Path
Path('~/mydir/').mkdir(parents=True, exist_ok=True)
...but this creates the directory here:
/script-location/~/mydir/
What I really want is mydir to be created in the user's home directory:
~/mydir/
How can I do this without querying the user's login name?