You need to expand the tilde manually:
my_dir = os.path.expanduser('~/some_dir')
More Related Contents:
- Windows path in Python
- ImageMagick not authorized to convert PDF to an image
- How to get an absolute file path in Python
- Pycharm and sys.argv arguments
- Install tkinter for Python
- Pass input/variables to command/script over SSH using Python Paramiko
- Why am I getting a FileNotFoundError?
- mysql_config not found when installing mysqldb python interface
- Python pip install module is not found. How to link python to pip location?
- Why doesn’t os.path.join() work in this case?
- Run Python script at startup in Ubuntu
- What do I need to read Microsoft Access databases using Python?
- How to find the real user home directory using python?
- Cross-platform space remaining on volume using python
- How do I read an image from a path with Unicode characters?
- Format of /dev/input/event*
- How to get output from subprocess.Popen(). proc.stdout.readline() blocks, no data prints out
- Use the default Python rather than the Anaconda installation when called from the terminal
- Understanding python subprocess.check_output’s first argument and shell=True [duplicate]
- Python script as linux service/daemon
- How to use export with Python on Linux
- Listing available devices in python-opencv
- Cron job: how to run a script that requires to open display?
- What is different between makedirs and mkdir of os?
- Could not find or load the Qt platform plugin “xcb”
- Python multiprocessing memory usage
- Cannot find the file specified when using subprocess.call(‘dir’, shell=True) in Python
- Finding all paths/walks of given length in a networkx graph
- How to move .conda from one folder to another at the moment of creating the environment
- Python – Trap all signals