MCPcopy Index your code
hub / github.com/python/cpython / handle_command_def

Method handle_command_def

Lib/pdb.py:1075–1101  ·  view source on GitHub ↗

Handles one command line during command list definition.

(self, line)

Source from the content-addressed store, hash-verified

1073 return self.handle_command_def(line)
1074
1075 def handle_command_def(self, line):
1076 """Handles one command line during command list definition."""
1077 cmd, arg, line = self.parseline(line)
1078 if not cmd:
1079 return False
1080 if cmd == 'end':
1081 return True # end of cmd list
1082 elif cmd == 'EOF':
1083 self.message('')
1084 return True # end of cmd list
1085 cmdlist = self.commands[self.commands_bnum]
1086 if cmd == 'silent':
1087 cmdlist.append('_pdbcmd_silence_frame_status')
1088 return False # continue to handle other cmd def in the cmd list
1089 if arg:
1090 cmdlist.append(cmd+' '+arg)
1091 else:
1092 cmdlist.append(cmd)
1093 # Determine if we must stop
1094 try:
1095 func = getattr(self, 'do_' + cmd)
1096 except AttributeError:
1097 func = self.default
1098 # one of the resuming commands
1099 if func.__name__ in self.commands_resuming:
1100 return True
1101 return False
1102
1103 def _colorize_code(self, code):
1104 if self.colorize and _pyrepl:

Callers 1

onecmdMethod · 0.95

Calls 3

messageMethod · 0.95
parselineMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected