@repl_command<EOL><INDENT>def do_opt(self, *args, **kwargs):<DEDENT>
args = list(args)<EOL>if not args:<EOL><INDENT>largest = <NUM_LIT:0><EOL>keys = [key for key in self.conf if not key.startswith("<STR_LIT:_>")]<EOL>for key in keys:<EOL><INDENT>largest = max(largest, len(key))<EOL><DEDENT>for key in keys:<EOL><INDENT>print("<STR_LIT>" % (key.rjust(largest), self.conf[key]))<EOL><DEDENT>return<EOL><DEDENT>option = args.pop(<NUM_LIT:0>)<EOL>if not args and not kwargs:<EOL><INDENT>method = getattr(self, "<STR_LIT>" + option, None)<EOL>if method is None:<EOL><INDENT>self.getopt_default(option)<EOL><DEDENT>else:<EOL><INDENT>method()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>method = getattr(self, "<STR_LIT>" + option, None)<EOL>if method is None:<EOL><INDENT>print("<STR_LIT>" % option)<EOL><DEDENT>else:<EOL><INDENT>method(*args, **kwargs)<EOL>self.save_config()<EOL><DEDENT><DEDENT>
Get and set options