Python Forum

Full Version: change to home directory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
how to change the current directory to the home directory, in python?  if i have os.chdir(home) then where to get home from?
home="~"?
(Apr-20-2017, 04:12 AM)micseydel Wrote: [ -> ]home="~"?

Output:
OSError: [Errno 2] No such file or directory: '~'
that's better