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

Method register_postloop_hook

cmd2/cmd2.py:5836–5839  ·  view source on GitHub ↗

Register a function to be called at the end of the command loop.

(self, func: Callable[[], None])

Source from the content-addressed store, hash-verified

5834 self._preloop_hooks.append(func)
5835
5836 def register_postloop_hook(self, func: Callable[[], None]) -> None:
5837 """Register a function to be called at the end of the command loop."""
5838 self._validate_prepostloop_callable(func)
5839 self._postloop_hooks.append(func)
5840
5841 @classmethod
5842 def _validate_postparsing_callable(cls, func: Callable[[plugin.PostparsingData], plugin.PostparsingData]) -> None:

Calls 2

appendMethod · 0.80