title: What is a cross-platform way to get the home directory?
body: <p>I need to get the location of the home directory of the current logged-on user. Currently, I've been using the following on Linux:</p>
  <pre class="lang-py prettyprint-override"><code>os.getenv(&quot;HOME&quot;)
  </code></pre>
  <p>However, this does not work on Windows. What is the correct cross-platform way to do this ?</p>