title: Check Linux distribution name
body: <p>I have to get the Linux distribution name from a Python script. There is a <code>dist</code> method in the platform module:</p>
  
  <pre><code>import platform
  platform.dist()
  </code></pre>
  
  <p>But under my Arch Linux it returns:</p>
  
  <pre><code>&gt;&gt;&gt; platform.dist()
  ('', '', '')
  </code></pre>
  
  <p>Why? How can I get the name?</p>
  
  <p>PS. I have to check whether the distribution is Debian-based.</p>
  
  <hr>
  
  <p>Update: I found here <a href="http://docs.python.org/library/platform.html#unix-platforms" rel="noreferrer">Python site</a>, that dist() is deprecated since 2.6.</p>
  
  <pre><code>&gt;&gt;&gt; platform.linux_distribution()
  ('', '', '')
  </code></pre>