title: Reducing a path to simplest value?
body: <p>Is there an os.path function to reduce a path to its simplest form? For example, is there a way to reduce <code>/a/b/c/../../</code> to <code>/a/</code>?</p>
  
  <p>I've tried <code>os.path.abspath(url)</code> but this prepends my home directory as well. For example, if I want <code>www.google.com/a/index.html</code> it returns <code>/Users/myname/Documents/www.google.com/a/index.html</code></p>
  
  <p>Obviously one possible solution is to remove <code>/Users/myname/Documents/</code> from all paths that I create, but I feel like there must be a better way...</p>