def process_plot():
    print "Post processing"
    postprocess.process(csvdirname)

    for key, values in config.map_pid_filename.items():
        print "Plot and Store: ", values["filename"]
        filename = csvdirname + values["filename"]
        print filename
        result_folder = resultdirname + values["filename"]
        intervalplot.plot(filename, seq=result_folder)

    files = [csvdirname + values["filename"] for key, values in config.map_pid_filename.items()]
    compareintervalplot.plot(files, seq=resultdirname + "compare")

    print "Results can be found in: " + csvdirname
def signal_handler(signal,frame):
    print "You pressed Ctrl+C"
    print "Post processing"
    postprocess.process(csvdirname)

    for key,values in config.map_pid_filename.items():
        print "Plot and Store: ", values['filename']
        filename = csvdirname+values['filename']
        result_folder = resultdirname+values['filename']
        intervalplot.plot(filename, seq=result_folder)

    files = [csvdirname+values['filename'] for key,values in config.map_pid_filename.items() ]
    compareintervalplot.plot(files, seq = resultdirname+'compare')


    print "Results can be found in: " + csvdirname
    sys.exit(0)