def __init__(self, model, **opts):
colors = not opts.get("<STR_LIT>")<EOL>def _show(submodel, offset):<EOL><INDENT>numoffset = len(str(len(list(submodel)))) - <NUM_LIT:1><EOL>for i, v in enumerate(submodel, start=<NUM_LIT:1>):<EOL><INDENT>(name, priority, comment, done, subitems) = v<EOL>padding = "<STR_LIT:U+0020>" * offset<EOL>if i < <NUM_LIT:10>:<EOL><INDENT>padding += "<STR_LIT:U+0020>" * numoffset<EOL><DEDENT>print("<STR_LIT>".format(<EOL>colors and View.RESET or "<STR_LIT>",<EOL>padding,<EOL>colors and View.COLORS[priority] or "<STR_LIT>",<EOL>colors and (done and View.DIM or View.BRIGHT) or "<STR_LIT>",<EOL>i, done and '<STR_LIT:->' or '<STR_LIT:.>', name<EOL>))<EOL>padding += "<STR_LIT:U+0020>" * (len(str(i)) + <NUM_LIT:1>)<EOL>if comment:<EOL><INDENT>print("<STR_LIT>".format(<EOL>padding,<EOL>colors and View.RESET or "<STR_LIT>",<EOL>comment<EOL>))<EOL><DEDENT>_show(subitems, offset + <NUM_LIT:2> + numoffset)<EOL><DEDENT><DEDENT>_show(model, <NUM_LIT:0>)<EOL>
Creates new View instance.

        Displays the Model contents, basing on :opts:, and exits.

        :model: Model instance.
        :opts: Options defining how the View looks.