Accessing relative path in Python
- by Aaron Hoffman
Hi,
I'm running a Mac OS X environment and am used to using ~/ to provide the access to the current user's directory.
For example, in my python script I'm just trying to use
os.chdir("/Users/aaron/Desktop/testdir/")
But would like to use
os.chdir("~/Desktop/testdir/")
I'm getting a no such file or directory error when trying to run this. Any ideas?