"already exists, then it does nothing.")) parser.add_argument('test_name', action='store', help=("The name of the root folder that stores the " "test files")) parser.add_argument('sequence_fn', action='store', help=("The sequence .txt file to extract textkeys " "from")) parser.add_argument('output_fn', action='store', help=("The dictionary .txt to output textkeys and " "their value strings")) try: cmdArgs = user_script_helper.runScriptLogic(parser) except user_script_helper.InteractiveModeException: _mode = raw_input("Enter a mode (update, crop, or new):\n") _test_name = raw_input(("Enter the name of your test " "(the root folder):\n")) _sequence_fn = raw_input("Enter the name of your sequence file:\n") _output_fn = raw_input(("Enter the name of the dictionary file to " "write to:\n")) else: _mode = cmdArgs.mode _test_name = cmdArgs.test_name _sequence_fn = cmdArgs.sequence_fn _output_fn = cmdArgs.output_fn generateLanguageDictionary(_mode, _test_name, _sequence_fn, _output_fn)
parser.add_argument('test_name', action='store', help=("The name of the root folder that stores the " "test files")) parser.add_argument('sequence_fn', action='store', help=("The sequence .txt file")) parser.add_argument('remove_duplicates_flag', action='store', help=("Remove duplicate items? (true/false)")) parser.add_argument('--remove_list', action='store', nargs='*', help=("A list of stimuli names to remove from " "consideration. Typically, these are testing " "or demonstration items. List as many items " "as needed after --remove_list, separated by " "a space character")) try: cmdArgs = user_script_helper.runScriptLogic(parser) except user_script_helper.InteractiveModeException: _test_name = raw_input(("Enter the name of your test " "(the root folder):\n")) _sequence_fn = raw_input("Enter the name of your sequence file:\n") _remove_duplicates_flag = raw_input("Remove duplicate items? " "(true/false)\n") _remove_items_flag = raw_input("Would you like to remove any items " "(e.g. sample/test items)? (yes/no):\n") if _remove_items_flag.lower() == 'yes': _remove_item_list = raw_input("Enter a list of stimuli names to " "remove (separated by a space):\n") _remove_item_list = _remove_item_list.split(" ") else: _remove_item_list = [] else: