Get Home directory path in Python (win, lin, other?)


/ Published in: Python
Save to your folder(s)

The current user's home directory is probably the easiest way to get a writeable directory, and expanduser does the sensible thing on various OSes.

In case of windows, you can choose to be smarter about *which* directory you pick.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.