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

Method do_theme_show

examples/rich_theme.py:38–44  ·  view source on GitHub ↗

Showcases the custom theme by printing messages with different styles.

(self, _: cmd2.Statement)

Source from the content-addressed store, hash-verified

36
37 @cmd2.with_category("Theme Commands")
38 def do_theme_show(self, _: cmd2.Statement):
39 """Showcases the custom theme by printing messages with different styles."""
40 self.poutput("This is a basic output message.")
41 self.psuccess("This is a success message.")
42 self.pwarning("This is a warning message.")
43 self.perror("This is an error message.")
44 self.pexcept(ValueError("This is a dummy ValueError exception."))
45
46
47if __name__ == "__main__":

Callers

nothing calls this directly

Calls 5

poutputMethod · 0.80
psuccessMethod · 0.80
pwarningMethod · 0.80
perrorMethod · 0.80
pexceptMethod · 0.80

Tested by

no test coverage detected