INNER CODE UNIT · Python
depth
dhondta/python-codext · src/codext/__init__.py:42
depth = -1
except ValueError:
if n == 0:
d[-1] = []
depth = -1
d.setdefault(depth, [])
d[depth].append(i.strip())
return d
def __print_tabular(lst, space=4):
try:
cols, _ = os.get_terminal_size()
# first, convert the list to a table that fits into the terminal
i, line, w = 0, "", []
while i < len(lst):
x = lst[i]
l = len(x)