diff options
Diffstat (limited to 'examples/remove_settable.py')
-rwxr-xr-x | examples/remove_settable.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/remove_settable.py b/examples/remove_settable.py new file mode 100755 index 00000000..13a75e11 --- /dev/null +++ b/examples/remove_settable.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +# coding=utf-8 +""" +A sample application for cmd2 demonstrating how to remove one of the built-in runtime settable parameters. +""" +import cmd2 + + +class MyApp(cmd2.Cmd): + + def __init__(self): + super().__init__() + self.settables.pop('debug') + + +if __name__ == '__main__': + import sys + c = MyApp() + sys.exit(c.cmdloop()) |