shutil.rmtree will not delete read-only files on Windows. Is there a python equivalent of \"rm -rf\" ? Why oh why is this such a pain?
shutil.rmtree
Another way is to define rmtree on Windows as
rmtree = lambda path: subprocess.check_call(['cmd', '/c', 'rd', '/s', '/q', path])