def parse_args():
    """Parses arguments and returns a dictionary"""
    opt_list, _ = getopt.getopt(sys.argv[1:],'k',['folder=', 'suite='])
    opt_dict = {}

    for opt, arg in opt_list:
        if opt == '-k':
            opt_dict['remove'] = False
            errwrite('I will keep all files.')

        if opt == '--folder':
            opt_dict['folder'] = arg
            errwrite('I will put all data into folder `%s`.' % arg)

        if opt == '--suite':
            opt_dict['suite_no'] = arg
            errwrite('I will run suite `%s`.' % arg)

    sys.argv = [sys.argv[0]]
    return opt_dict

# Prepare config on loading, just in case tests are not called via run_suite()
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/tests/testutils/ioutils.py/parse_args/original