Module Import alias Assign NameStore ListLoad Str Str Assign NameStore TupleLoad AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad Str Assign NameStore TupleLoad AttributeLoad NameLoad attr Call NameLoad Str Assign NameStore TupleLoad AttributeLoad NameLoad attr Call NameLoad Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str Num body If CompareEq Call NameLoad NameLoad Num body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If CompareGtE NameLoad Call NameLoad NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body AugAssignSub AttributeStore NameLoad attr Num If CompareLt AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr BinOpSub Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body AugAssignAdd AttributeStore NameLoad attr Num If CompareGtE AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Return BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad Str Return ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore BinOpMult Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore BinOpAdd BinOpAdd AttributeLoad NameLoad attr Call NameLoad NameLoad Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore TupleLoad Num Num Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BinOpSub NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str Num If CompareLtE NameLoad NameLoad body Assign NameStore Num orelse If CompareGt BinOpSub NameLoad NameLoad NameLoad body Assign NameStore BinOpSub NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad BinOpAdd NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad AugAssignAdd NameStore Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body While NameLoad body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr orelse If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr orelse If CompareIn NameLoad NameLoad body Return Call AttributeLoad NameLoad attr orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad If NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Str Num body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr decorator_list
N/A N/A curses N/A __all__ N/A Picker pick N/A KEYS_ENTER N/A N/A curses KEY_ENTER N/A ord N/A ord N/A KEYS_UP N/A N/A curses KEY_UP N/A ord k N/A KEYS_DOWN N/A N/A curses KEY_DOWN N/A ord j Picker N/A object N/A N/A The :class:`Picker <Picker>` object

    :param options: a list of options to choose from
    :param title: (optional) a title above options list
    :param indicator: (optional) custom the selection indicator
    :param default_index: (optional) set this if the default selected option is not the first one
     __init__ N/A N/A self options title indicator default_index N/A None * 0 N/A N/A N/A N/A len options 0 N/A N/A N/A ValueError options should not be an empty list N/A N/A self options options N/A N/A self title title N/A N/A self indicator indicator N/A N/A default_index N/A len options N/A N/A N/A ValueError default_index should be less than the length of options N/A N/A self index default_index N/A N/A self custom_handlers N/A N/A register_custom_handler N/A N/A self key func N/A N/A N/A N/A N/A self custom_handlers N/A key func N/A move_up N/A N/A self N/A N/A N/A N/A self index 1 N/A N/A N/A self index 0 N/A N/A N/A self index N/A N/A len N/A self options 1 N/A move_down N/A N/A self N/A N/A N/A N/A self index 1 N/A N/A N/A self index N/A len N/A self options N/A N/A N/A self index 0 N/A get_selected N/A N/A self N/A N/A N/A return the current selected option as a tuple: (option, index)
         N/A N/A N/A N/A self options N/A N/A self index N/A self index N/A get_title_lines N/A N/A self N/A N/A N/A N/A self title N/A N/A N/A N/A N/A N/A self title split N/A N/A N/A N/A get_option_lines N/A N/A self N/A N/A N/A lines N/A N/A N/A index option N/A enumerate N/A self options N/A N/A N/A index N/A self index N/A N/A prefix N/A self indicator N/A N/A prefix N/A N/A len N/A self indicator N/A line N/A N/A {0} {1} format prefix option N/A N/A N/A lines append line N/A lines N/A get_lines N/A N/A self N/A N/A N/A title_lines N/A N/A self get_title_lines N/A option_lines N/A N/A self get_option_lines N/A lines N/A title_lines option_lines N/A current_line N/A N/A N/A self index N/A len title_lines 1 N/A N/A lines current_line N/A draw N/A N/A self N/A N/A N/A draw the curses ui on the screen, handle scroll if needed N/A N/A N/A N/A self screen clear N/A N/A x y N/A 1 1 N/A N/A max_y max_x N/A N/A N/A self screen getmaxyx N/A max_rows N/A max_y y N/A N/A lines current_line N/A N/A self get_lines N/A scroll_top N/A getattr self scroll_top 0 N/A N/A current_line scroll_top N/A N/A scroll_top 0 N/A N/A N/A N/A current_line scroll_top max_rows N/A N/A scroll_top N/A current_line max_rows N/A N/A self scroll_top scroll_top N/A lines_to_draw N/A lines N/A scroll_top N/A scroll_top max_rows N/A line lines_to_draw N/A N/A N/A N/A N/A self screen addstr y x line N/A y 1 N/A N/A N/A N/A self screen refresh N/A run_loop N/A N/A self N/A N/A N/A True N/A N/A N/A N/A self draw N/A c N/A N/A N/A self screen getch N/A N/A c KEYS_UP N/A N/A N/A N/A self move_up N/A N/A N/A c KEYS_DOWN N/A N/A N/A N/A self move_down N/A N/A N/A c KEYS_ENTER N/A N/A N/A N/A self get_selected N/A N/A N/A c N/A self custom_handlers N/A N/A ret N/A N/A N/A self custom_handlers N/A c self N/A ret N/A N/A ret N/A config_curses N/A N/A self N/A N/A N/A N/A N/A curses use_default_colors N/A N/A N/A curses curs_set 0 N/A _start N/A N/A self screen N/A N/A N/A N/A self screen screen N/A N/A N/A self config_curses N/A N/A N/A self run_loop N/A start N/A N/A self N/A N/A N/A N/A N/A curses wrapper N/A self _start N/A N/A pick N/A N/A options title indicator default_index N/A None * 0 N/A N/A Construct and start a :class:`Picker <Picker>`.

    Usage::

      >>> from pick import pick
      >>> title = 'Please choose an option: '
      >>> options = ['option1', 'option2', 'option3']
      >>> option, index = pick(options, title)
     N/A picker N/A Picker options title indicator default_index N/A N/A N/A picker start N/A