MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / handle_command_def

Method handle_command_def

tools/python-3.11.9-amd64/Lib/pdb.py:488–512  ·  view source on GitHub ↗

Handles one command line during command list definition.

(self, line)

Source from the content-addressed store, hash-verified

486 return self.handle_command_def(line)
487
488 def handle_command_def(self, line):
489 """Handles one command line during command list definition."""
490 cmd, arg, line = self.parseline(line)
491 if not cmd:
492 return False
493 if cmd == 'silent':
494 self.commands_silent[self.commands_bnum] = True
495 return False # continue to handle other cmd def in the cmd list
496 elif cmd == 'end':
497 return True # end of cmd list
498 cmdlist = self.commands[self.commands_bnum]
499 if arg:
500 cmdlist.append(cmd+' '+arg)
501 else:
502 cmdlist.append(cmd)
503 # Determine if we must stop
504 try:
505 func = getattr(self, 'do_' + cmd)
506 except AttributeError:
507 func = self.default
508 # one of the resuming commands
509 if func.__name__ in self.commands_resuming:
510 self.commands_doprompt[self.commands_bnum] = False
511 return True
512 return False
513
514 # interface abstraction functions
515

Callers 1

onecmdMethod · 0.95

Calls 2

parselineMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected