def __init__(self, rlobj): self.argument = 0 self.rlobj = rlobj self.exit_dispatch = {} self.key_dispatch = {} self.argument = 1 self.prevargument = None self.l_buffer = lineobj.ReadLineTextBuffer("") self._history = history.LineHistory() self.completer_delims = u" \t\n\"\\'`@$><=;|&{(" self.show_all_if_ambiguous = u'off' self.mark_directories = u'on' self.completer = None self.begidx = 0 self.endidx = 0 self.tabstop = 4 self.startup_hook = None self.pre_input_hook = None self.first_prompt = True self.cursor_size = 25 self.prompt = u">>> " #Paste settings #assumes data on clipboard is path if shorter than 300 characters and doesn't contain \t or \n #and replace \ with / for easier use in ipython self.enable_ipython_paste_for_paths = True #automatically convert tabseparated data to list of lists or array constructors self.enable_ipython_paste_list_of_lists = True self.enable_win32_clipboard = True self.paste_line_buffer = [] self._sub_modes = []
def __init__(self, rlobj): self.argument = 0 self.rlobj = rlobj self.exit_dispatch = {} self.key_dispatch = {} self.argument = 1 self.prevargument = None self.l_buffer = lineobj.ReadLineTextBuffer('') self._history = history.LineHistory() self.completer_delims = ' \t\n"\\\'`@$><=;|&{(' self.show_all_if_ambiguous = 'off' self.mark_directories = 'on' self.complete_filesystem = 'off' self.completer = None self.begidx = 0 self.endidx = 0 self.tabstop = 4 self.startup_hook = None self.pre_input_hook = None self.first_prompt = True self.cursor_size = 25 self.prompt = '>>> ' self.enable_ipython_paste_for_paths = True self.enable_ipython_paste_list_of_lists = True self.enable_win32_clipboard = True self.paste_line_buffer = [] self._sub_modes = [] return
def __init__( self, rlobj, argument=1, prevargument=None, show_all_if_ambiguous="on", mark_directories="on", complete_filesystem="off", completer=None, begidx=0, endidx=0, tabstop=4, ): """Initialize the class. Still adding more keyword arguments. Parameters ---------- TODO """ self.rlobj = rlobj self.exit_dispatch = {} self.key_dispatch = {} self.argument = argument self.prevargument = prevargument self.l_buffer = lineobj.ReadLineTextBuffer("") self._history = history.LineHistory() self.completer_delims = r" \t\n\"\\'`@$><=;|&{(" self.show_all_if_ambiguous = show_all_if_ambiguous self.mark_directories = mark_directories self.complete_filesystem = complete_filesystem self.completer = completer self.begidx = begidx self.endidx = endidx self.tabstop = tabstop self.startup_hook = None self.pre_input_hook = None self.first_prompt = True self.cursor_size = 25 self.prompt = ">>> " # Paste settings # assumes data on clipboard is path if shorter than 300 characters and doesn't contain \t or \n # and replace \ with / for easier use in ipython self.enable_ipython_paste_for_paths = True # automatically convert tabseparated data to list of lists or array constructors self.enable_ipython_paste_list_of_lists = True self.enable_win32_clipboard = True self.paste_line_buffer = [] self._sub_modes = []
def __init__(self): self.startup_hook = None self.pre_input_hook = None self.completer = None self.completer_delims = " \t\n\"\\'`@$><=;|&{(" self.console = console.Console() self.size = self.console.size() self.prompt_color = None self.command_color = None self.selection_color = self.console.saveattr<<4 self.key_dispatch = {} self.previous_func = None self.first_prompt = True self.next_meta = False # True to force meta on next character self.tabstop = 4 self.allow_ctrl_c=False self.ctrl_c_tap_time_interval=0.3 self.debug=False self.begidx = 0 self.endidx = 0 # variables you can control with parse_and_bind self.show_all_if_ambiguous = 'off' self.mark_directories = 'on' self.bell_style = 'none' self.mark=-1 self.l_buffer=lineobj.ReadLineTextBuffer("") self._history=history.LineHistory() # this code needs to follow l_buffer and history creation self.editingmodes=[mode(self) for mode in editingmodes] for mode in self.editingmodes: mode.init_editing_mode(None) self.mode=self.editingmodes[0] self.read_inputrc() log("\n".join(self.rl_settings_to_string())) #Paste settings #assumes data on clipboard is path if shorter than 300 characters and doesn't contain \t or \n #and replace \ with / for easier use in ipython self.enable_ipython_paste_for_paths=True #automatically convert tabseparated data to list of lists or array constructors self.enable_ipython_paste_list_of_lists=True self.enable_win32_clipboard=True self.paste_line_buffer=[] self.callback = None
def __init__(self): self.l_buffer = lineobj.ReadLineTextBuffer("") self._history = history.LineHistory()