ranger.gui.widgets.console
index
../../ranger/gui/widgets/console.py

The Console widget implements a vim-like console

 
Modules
       
curses
ranger
re

 
Classes
       
ranger.gui.widgets.Widget(ranger.gui.displayable.Displayable)
Console

 
class Console(ranger.gui.widgets.Widget)
    
Method resolution order:
Console
ranger.gui.widgets.Widget
ranger.gui.displayable.Displayable
ranger.core.shared.EnvironmentAware
ranger.core.shared.FileManagerAware
ranger.gui.curses_shortcuts.CursesShortcuts
ranger.core.shared.SettingsAware
builtins.object

Methods defined here:
__init__(self, win)
add_to_history(self)
ask(self, text, callback, choices=['y', 'n'])
Open a question prompt with predefined choices
 
The "text" is displayed as the question text and should include a list
of possible keys that the user can type.  The "callback" is a function
that is called when the question is answered.  It only gets the answer
as an argument.  "choices" is a tuple of one-letter strings that can be
typed in by the user.  Every other input gets ignored, except <Enter>
and <ESC>.
 
The first choice is used when the user presses <Enter>, the second
choice is used when the user presses <ESC>.
clear(self)
close(self, trigger_cancel_function=True)
delete(self, mod)
delete_rest(self, direction)
delete_word(self, backward=True)
destroy(self)
draw(self)
execute(self, cmd=None)
finalize(self)
history_move(self, n)
move(self, **keywords)
on_line_change(self)
open(self, string='', prompt=None, position=None)
paste(self)
press(self, key)
tab(self, n=1)
type_key(self, key)

Data and other attributes defined here:
allow_close = False
copy = ''
history = None
history_backup = None
history_search_pattern = None
historypath = None
last_cursor_mode = None
original_line = None
override = None
prompt = ':'
tab_deque = None
unicode_buffer = ''
visible = False
wait_for_command_input = False

Data and other attributes inherited from ranger.gui.widgets.Widget:
vcsfilestatus_symb = {'changed': ('*', ['vcschanged']), 'conflict': ('X', ['vcsconflict']), 'deleted': ('-', ['vcschanged']), 'ignored': ('·', ['vcsignored']), 'none': (' ', []), 'staged': ('*', ['vcsstaged']), 'sync': ('√', ['vcssync']), 'unknown': ('?', ['vcsunknown']), 'untracked': ('+', ['vcschanged'])}
vcsremotestatus_symb = {'ahead': ('>', ['vcsahead']), 'behind': ('<', ['vcsbehind']), 'diverged': ('Y', ['vcsdiverged']), 'none': (' ', []), 'sync': ('=', ['vcssync']), 'unknown': ('?', ['vcsunknown'])}

Methods inherited from ranger.gui.displayable.Displayable:
__bool__ = __nonzero__(self)
Always True
__contains__(self, item)
Checks if item is inside the boundaries.
 
item can be an iterable like [y, x] or an object with x and y methods.
__nonzero__(self)
Always True
__str__(self)
click(self, event)
Called when a mouse key is pressed and self.focused is True.
 
Override this!
contains_point(self, y, x)
Test whether the point lies inside this object.
 
x and y should be absolute coordinates.
poke(self)
Called before drawing, even if invisible
resize(self, y, x, hei=None, wid=None)
Resize the widget

Methods inherited from ranger.core.shared.EnvironmentAware:
env = None
Data descriptors inherited from ranger.core.shared.EnvironmentAware:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Methods inherited from ranger.gui.curses_shortcuts.CursesShortcuts:
addch(self, *args)
addnstr(self, *args)
addstr(self, *args)
color(self, *keys)
Change the colors from now on.
color_at(self, y, x, wid, *keys)
Change the colors at the specified position
color_reset(self)
Change the colors to the default colors
set_fg_bg_attr(self, fg, bg, attr)