<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"""
Combine the results files from the output of the discover_ae.py runs.
"""
import os
import sys

result_dir = sys.argv[1]

result_file_name = 'result_file.csv'
result_file = os.path.join(result_dir,result_file_name)
result_fh = open(result_file,'w')

files = os.listdir(result_dir)

for file_name in files:
    if not file_name == result_file_name and not file_name.find('csv') == -1:
        for line in open(os.path.join(result_dir,file_name)).readlines()[1:]:
            print &gt;&gt; result_fh, "%s,%s" % (file_name.split('.')[0], line.strip())

result_fh.close()</pre></body></html>