How to find current user home directory in OS X?
HOME environment variable is not always set, for example, when you do not start the console (GUI applications).
For this reason, I am looking for a universal solution that will os.environ['HOME'] if os.environ['HOME'] not installed.
There is a similar question (C) , but it already has a decision that is not valid.
A Python solution would be preferable, but other languages ββare welcome as they provide a real home or at least one place where you can write.
home-directory macos
sorin
source share