File: remove_settable.py

package info (click to toggle)
cmd2 2.4.2%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,672 kB
  • sloc: python: 19,288; makefile: 88; sh: 16
file content (19 lines) | stat: -rwxr-xr-x 365 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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())