Today I got asked if it was possible to recurse through a folder structure and find all the empty directories within that structure. It sounded like a simple job for os.walk, and it was. The os.walk recurses a directory structure returning a 3-tuple for each directory (including the starting directory) containing the directory path, aContinue reading “Empty directories”
Tag Archives: folder
Modules
At the risk of simply repeating the document on modules, to run a method from a different python file you can use either of the following code snippets. The first gives you access to all the methods and variables inside of the file (note you don’t need the file extension) from within its own namespace.Continue reading “Modules”