INNER CODE UNIT · Python

tokenize_string

hahnlab/CAFE5 · scripts/cfg_maker.py:109

    def tokenize_string(a_string):
        if a_string == ',':
            return []

        return a_string.split(',')

    @staticmethod
    def dictionize_lists(list1, list2):
        if len(list1) != len(list2): exit("The list of arguments was longer or shorter than the list of values")
        
        return dict((i, list2[idx]) for idx, i in enumerate(list1))
    
if __name__ == "__main__":
    
    parser = argparse.ArgumentParser()
    parser.add_argument("-c", "--cafexp-bin-path", action="store", dest="cafexp_path", default='./', type=str, help="path to CAFExp bin", required=True)
    parser.add_argument("-ia", "--input-args", action="store", dest="input_args", default='', type=str, help="arguments for input options, separated by comma", required=True)
    parser.add_argument("-iv", "--input-values", action="store", dest="input_values", default='', type=str, help="values for input section, separated by comma", required=True)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…