title: How to get hard disk serial number using Python
body: <p>How can I get the <code>serial number</code> of a <code>hard disk</code> drive using <code>Python</code> on <code>Linux</code>?</p>
  
  <p>I would like to use a Python module to do that instead of running an external program such as <a href="http://linux.die.net/man/8/hdparm" rel="noreferrer"><code>hdparm</code></a>.  Perhaps using the <a href="http://man7.org/linux/man-pages/man2/fcntl.2.html" rel="noreferrer"><code>fcntl</code></a> module?</p>