diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2020-02-06 18:20:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 18:20:50 -0500 |
commit | c7ac2e965d025806ce5baddfc718814e3e58d639 (patch) | |
tree | 6e046c2445edf62b024a9389dc719865584dc9cf /examples/remove_settable.py | |
parent | 60a212c1c585f0c4c06ffcfeb9882520af8dbf35 (diff) | |
parent | c4893ea8a132c06bc71b0ddd63801604e6f85177 (diff) | |
download | cmd2-git-c7ac2e965d025806ce5baddfc718814e3e58d639.tar.gz |
Merge pull request #873 from python-cmd2/set_update
Updated set command to support tab completion of values
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..6a2e4062 --- /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.remove_settable('debug') + + +if __name__ == '__main__': + import sys + c = MyApp() + sys.exit(c.cmdloop()) |