title: Check if file path is block device in Python
body: <p>I have some file path in Python under Linux and I need to figure out if it's a block device - representation of disk or partition. This information is visible when typing ls -l, e.g.</p>
  
  <pre><code>brw-rw---- 1 root disk 8, 1 09-12 18:01 /dev/sda1
  </code></pre>
  
  <p>I mean letter <strong>b</strong> on start of this output. Is this possible to get something like this in Python using built in libraries? Eventually I can use subprocess to fetch "ls -l" result and check if first character is correct, but i feel that there could be nicer solution for this. Unfortunately I can't find this. Thanks.</p>