code: def run(self):
          
          history = InMemoryHistory()
          self._load_file()
  
          while True:
              # (re)load the todo.txt file (only if it has been modified)
  
              try:
                  user_input = prompt(u'topydo> ', history=history,
                                      completer=self.completer,
                                      complete_while_typing=False)
                  user_input = shlex.split(user_input)
              except EOFError:
                  sys.exit(0)
              except KeyboardInterrupt:
                  continue
              except ValueError as verr:
                  error('Error: ' + str(verr))
                  continue
  
              try:
                  (subcommand, args) = get_subcommand(user_input)
              except ConfigError as ce:
                  error('Error: ' + str(ce) + '. Check your aliases configuration')
                  continue
  
              try:
                  if self._execute(subcommand, args) != False:
                      self._post_execute()
              except TypeError:
                  print(GENERIC_HELP)
docs: Main entry function.