def main(): load_pseudonyms() if len(sys.argv) > 1: for fn in sys.argv[1:]: filter_file(fn) else: dirList = os.listdir(os.path.dirname(sys.argv[0])) for fname in dirList: split = os.path.splitext(fname) if (split[1].lower() == '.csv' and split[0].upper()[:5] != 'ANON_' and split[0] != 'pseudonyms'): filter_file(fname) save_pseudonyms()