Python urwid.ParentNode() Examples
The following are 2
code examples of urwid.ParentNode().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
urwid
, or try the search function
.
Example #1
Source File: tree.py From redial with GNU General Public License v3.0 | 5 votes |
def __init__(self, value, parent=None, key=None, depth=None, key_handler=None): urwid.ParentNode.__init__(self, value, parent=parent, key=key, depth=depth) self.key_handler = key_handler
Example #2
Source File: browse.py From zstack-utility with Apache License 2.0 | 5 votes |
def __init__(self, path, parent=None): if path == dir_sep(): depth = 0 key = None else: depth = path.count(dir_sep()) key = os.path.basename(path) urwid.ParentNode.__init__(self, path, key=key, parent=parent, depth=depth)