import os, shutil from glob import glob [os.unlink(f) for f in glob('blah/*')] os.rmdir('blah')