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

Method do_cut

tests/test_commandset.py:455–464  ·  view source on GitHub ↗

Cut something

(self, ns: argparse.Namespace)

Source from the content-addressed store, hash-verified

453 self._dummy = dummy # prevents autoload
454
455 def do_cut(self, ns: argparse.Namespace) -> None:
456 """Cut something"""
457 handler = ns.cmd2_subcmd_handler
458 if handler is not None:
459 # Call whatever subcommand function was selected
460 handler(ns)
461 else:
462 # No subcommand was provided, so call help
463 self._cmd.poutput("This command does nothing without sub-parsers registered")
464 self._cmd.do_help("cut")
465
466
467class LoadableFruits(cmd2.CommandSet):

Callers

nothing calls this directly

Calls 2

poutputMethod · 0.80
do_helpMethod · 0.80

Tested by

no test coverage detected