def complete_opt(self, text, line, begidx, endidx):
tokens = line.split()<EOL>if len(tokens) == <NUM_LIT:1>:<EOL><INDENT>if text:<EOL><INDENT>return<EOL><DEDENT>else:<EOL><INDENT>option = "<STR_LIT>"<EOL><DEDENT><DEDENT>else:<EOL><INDENT>option = tokens[<NUM_LIT:1>]<EOL><DEDENT>if len(tokens) == <NUM_LIT:1> or (len(tokens) == <NUM_LIT:2> and text):<EOL><INDENT>return [<EOL>name[<NUM_LIT:4>:] + "<STR_LIT:U+0020>" for name in dir(self) if name.startswith("<STR_LIT>" + text)<EOL>]<EOL><DEDENT>method = getattr(self, "<STR_LIT>" + option, None)<EOL>if method is not None:<EOL><INDENT>return method(text, line, begidx, endidx)<EOL><DEDENT>
Autocomplete for options