Trying to remove all of the files in a certain directory gives me the follwing error:
OSError: [Errno 2] No such file or directory: \'/home/me/test/*\
Bit of a hack but if you would like to keep the directory, the following can be used.
import os import shutil shutil.rmtree('/home/me/test') os.mkdir('/home/me/test')