MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / do_cut

Method do_cut

examples/command_sets.py:151–159  ·  view source on GitHub ↗

Intended to be used with dynamically loaded subcommands specifically.

(self, ns: argparse.Namespace)

Source from the content-addressed store, hash-verified

149 @with_argparser(cut_parser)
150 @with_category(COMMANDSET_SUBCOMMAND)
151 def do_cut(self, ns: argparse.Namespace) -> None:
152 """Intended to be used with dynamically loaded subcommands specifically."""
153 handler = ns.cmd2_subcmd_handler
154 if handler is not None:
155 handler(ns)
156 else:
157 # No subcommand was provided, so call help
158 self.poutput("This command does nothing without sub-parsers registered")
159 self.do_help("cut")
160
161
162if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

poutputMethod · 0.80
do_helpMethod · 0.80

Tested by

no test coverage detected