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

Method onecmd

Lib/pdb.py:1059–1073  ·  view source on GitHub ↗

Interpret the argument as though it had been typed in response to the prompt. Checks whether this line is typed at the normal prompt or in a breakpoint command list definition.

(self, line)

Source from the content-addressed store, hash-verified

1057 return line
1058
1059 def onecmd(self, line):
1060 """Interpret the argument as though it had been typed in response
1061 to the prompt.
1062
1063 Checks whether this line is typed at the normal prompt or in
1064 a breakpoint command list definition.
1065 """
1066 if not self.commands_defining:
1067 if line.startswith('_pdbcmd'):
1068 command, arg, line = self.parseline(line)
1069 if hasattr(self, command):
1070 return getattr(self, command)(arg)
1071 return cmd.Cmd.onecmd(self, line)
1072 else:
1073 return self.handle_command_def(line)
1074
1075 def handle_command_def(self, line):
1076 """Handles one command line during command list definition."""

Callers 1

cmdloopMethod · 0.45

Calls 3

handle_command_defMethod · 0.95
parselineMethod · 0.80
startswithMethod · 0.45

Tested by

no test coverage detected