title: When should I use os.name vs. sys.platform vs. platform.system()?
body: <p>There are at least three ways to detect OS/platform in Python.</p>
  
  <p>What is the ideal application for each method? When should one method be used over another?</p>
  
  <hr>
  
  <p>EDIT: My specific use case is install-time and and run-time checking of dependencies. I don't want to install certain libraries in <code>setup.py</code> if I'm on "Windows" because it will require Visual Studio. Then, at run-time I want to check if the dependency is available (which it might not be on "Windows").</p>
  
  <p>EDIT 2: It would also be great to see a short example of when each level of OS detail is required.</p>