How can I get the default machine domain name in Python using a portable way?
<p>I am looking for a Python solution for obtaining the current machine default domain name, one that will work on Linux, Mac OS X and Windows.</p>

<p>So far I discovered that:</p>

<ul>
<li>Linux has <code>dnsdomainname</code> which returns it</li>
</ul>