title: How to get the PATH environment-variable separator in Python?
body: <p>When multiple directories need to be concatenated, as in an executable search path, there is an os-dependent separator character.  For Windows it's <code>';'</code>, for Linux it's <code>':'</code>.  Is there a way in Python to get which character to split on?</p>
  
  <p>In the discussions to this question <a href="https://stackoverflow.com/questions/1489599/how-do-i-find-out-my-python-path-using-python">How do I find out my python path using python?</a> , it is suggested that <code>os.sep</code> will do it. That answer is wrong, since it is the separator for components of a directory or filename and equates to <code>'\\'</code> or <code>'/'</code>.</p>