本文整理匯總了Python中ranger.ext.accumulator.Accumulator類的典型用法代碼示例。如果您正苦於以下問題:Python Accumulator類的具體用法?Python Accumulator怎麽用?Python Accumulator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Accumulator類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: correct_pointer
def correct_pointer(self):
"""Make sure the pointer is in the valid range"""
Accumulator.correct_pointer(self)
try:
if self == self.fm.env.cwd:
self.fm.env.cf = self.pointed_obj
except:
pass
示例2: correct_pointer
def correct_pointer(self):
"""Make sure the pointer is in the valid range"""
Accumulator.correct_pointer(self)
if self == self.fm.thisdir:
try:
self.fm.thisfile = self.pointed_obj
except AttributeError:
pass
示例3: correct_pointer
def correct_pointer(self):
"""Make sure the pointer is in the valid range"""
Accumulator.correct_pointer(self)
try:
if self == self.fm.thisdir:
self.fm.thisfile = self.pointed_obj
except Exception:
pass
示例4: move_to_obj
def move_to_obj(self, arg, attr=None):
try:
arg = arg.path
except AttributeError:
pass
self.load_content_once(schedule=False)
if self.empty():
return
Accumulator.move_to_obj(self, arg, attr='path')
示例5: move_to_obj
def move_to_obj(self, arg):
try:
arg = arg.path
except Exception:
pass
self.load_content_once(schedule=False)
if self.empty():
return
Accumulator.move_to_obj(self, arg, attr='path')
示例6: __init__
def __init__(self, path, **kw):
assert not os.path.isfile(path), "No directory given!"
Accumulator.__init__(self)
FileSystemObject.__init__(self, path, **kw)
self.marked_items = list()
for opt in ('sort_directories_first', 'sort', 'sort_reverse',
'sort_case_insensitive'):
self.settings.signal_bind('setopt.' + opt,
self.request_resort, weak=True)
for opt in ('hidden_filter', 'show_hidden'):
self.settings.signal_bind('setopt.' + opt,
self.request_reload, weak=True)
self.use()
示例7: __init__
def __init__(self, path, **kw):
assert not os.path.isfile(path), "No directory given!"
Loadable.__init__(self, None, None)
Accumulator.__init__(self)
FileSystemObject.__init__(self, path, **kw)
self.marked_items = list()
for opt in ('sort_directories_first', 'sort', 'sort_reverse', 'sort_case_insensitive'):
self.settings.signal_bind('setopt.' + opt, self.sort, weak=True, autosort=False)
for opt in ('hidden_filter', 'show_hidden'):
self.settings.signal_bind('setopt.' + opt, self.refilter, weak=True, autosort=False)
self.settings = LocalSettings(path, self.settings)
if self.settings.vcs_aware:
self.vcs = Vcs(self)
self.use()
示例8: __init__
def __init__(self, path, **kw):
assert not os.path.isfile(path), "No directory given!"
Loadable.__init__(self, None, None)
Accumulator.__init__(self)
FileSystemObject.__init__(self, path, **kw)
self.marked_items = []
self._signal_functions = []
func = self.signal_function_factory(self.sort)
self._signal_functions += [func]
for opt in ('sort_directories_first', 'sort', 'sort_reverse', 'sort_case_insensitive'):
self.settings.signal_bind('setopt.' + opt, func, weak=True, autosort=False)
func = self.signal_function_factory(self.refilter)
self._signal_functions += [func]
for opt in ('hidden_filter', 'show_hidden'):
self.settings.signal_bind('setopt.' + opt, func, weak=True, autosort=False)
self.settings = LocalSettings(path, self.settings)
self.use()
示例9: __init__
def __init__(self, win):
Widget.__init__(self, win)
Accumulator.__init__(self)
self.scroll_begin = 0