(folder)
Remove the given folder's content.
Remove the given folder's content.
Remove the given folder s content .
def clear_folder(folder):
    """
    Remove the given folder's content.
    """
    for the_file in os.listdir(folder):
        file_path = os.path.join(folder, the_file)
        try:
            if os.path.isfile(file_path):
                os.unlink(file_path)
        except Exception, e:
            print e
def clear_folder ( folder ) : for the_file in os . listdir ( folder ) : file_path = os . path . join ( folder , the_file ) try : if os . path . isfile ( file_path ) : os . unlink ( file_path ) except Exception , e : print e