title: python equivalent of perl's "opendir"
body: <p>What I am essentially looking for is a way to return a handle to a directory in python, a bit like how perl can do something like this...</p>
  
  <pre><code>opendir CWD .
  </code></pre>
  
  <p>see: <a href="http://perldoc.perl.org/5.8.9/functions/opendir.html" rel="nofollow noreferrer">http://perldoc.perl.org/5.8.9/functions/opendir.html</a></p>
  
  <p>CWD can then be used as a handle for pointing to the directory like <code>*CWD</code> in file operations.</p>
  
  <p>The closest I've come across in python is open() but that doesn't return file descriptors/pointers and doesn't work with directories.</p>