def select_segment(demofile): seg_names = demofile.keys() print "choose from the following options (type an integer)" for (i, seg_name) in enumerate(seg_names): print "%i: %s"%(i,seg_name) choice_ind = task_execution.request_int_in_range(len(seg_names)) chosen_seg = seg_names[choice_ind] return chosen_seg
def find_closest_manual(demofile, _new_xyz): "for now, just prompt the user" seg_names = demofile.keys() print "choose from the following options (type an integer)" for (i, seg_name) in enumerate(seg_names): print "%i: %s"%(i,seg_name) choice_ind = task_execution.request_int_in_range(len(seg_names)) chosen_seg = seg_names[choice_ind] return chosen_seg
def find_closest_manual(demofile, _new_xyz): "for now, just prompt the user" seg_names = demofile.keys() print "choose from the following options (type an integer)" for (i, seg_name) in enumerate(seg_names): print "%i: %s" % (i, seg_name) choice_ind = task_execution.request_int_in_range(len(seg_names)) chosen_seg = seg_names[choice_ind] return chosen_seg
def find_closest_manual(demofile, _new_xyz, original=False): """for now, just prompt the user""" seg_names = demofile.keys() print_string = "choose from the following options (type an integer). Enter a negative number to exit." print print_string for (i, seg_name) in enumerate(seg_names): print "%i: %s" % (i, seg_name) print print_string choice_ind = task_execution.request_int_in_range(len(seg_names)) if choice_ind < 0: return None chosen_seg = seg_names[choice_ind] return chosen_seg