title: Cross-platform Desktop directory path?
body: <p>Is there a way of obtaining the <strong>Desktop directory path</strong> in a <em>cross-platform</em> way, ideally only using standard modules, in Python?</p>
  
  <p>My current Mac OS X + Windows solution is to check which system is running Python with <a href="http://docs.python.org/library/sys.html#sys.platform" rel="nofollow noreferrer">sys.platform</a> and then do the following:</p>
  
  <ul>
  <li>Mac OS X can be handled with <code>os.path.join(os.path.expanduser('~'), 'Desktop')</code>.</li>
  <li><a href="http://ginstrom.com/scribbles/2008/09/26/retrieving-common-windows-folder-names-with-python/" rel="nofollow noreferrer">Windows</a> can use the non-standard module <code>win32com</code>, or the ctypes-dependent module <a href="http://ginstrom.com/code/winpaths.html" rel="nofollow noreferrer">winpaths</a>; is there a standard alternative?</li>
  <li>And what about Linux?</li>
  </ul>
  
  <p>I would be happy with a solution that works on Mac OS X, Windows and Linux.</p>