title: How do I use os.scandir() to return DirEntry objects recursively on a directory tree?
body: <p>Python 3.5's <code>os.scandir(path)</code> function returns lightweight DirEntry objects that are very helpful with information about files.  However, it only works for the immediate path handed to it.  Is there a way to wrap it in a recursive function so that it visits all subdirectories beneath the given path?</p>