title: How can I determine if the operating system a Python script is running on is Unix-like?
body: <p>I'm trying to determine if the operating system is Unix-based from a Python script. I can think of two ways to do this but both of them have disadvantages:</p>
  
  <ul>
  <li>Check if <code>platform.system()</code> is in a tuple such as <code>("Linux", "Darwin")</code>. The problem with this is that I don't want to provide a list of every Unix-like system every made, in particular there are many *BSD varieties.</li>
  <li>Check if the function <code>os.fchmod</code> exists, as this function is only available on Unix. This doesn't seem like a clean or "Pythonic" way to do it.</li>
  </ul>