File: remove_settable.py

package info (click to toggle)
cmd2 3.2.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,664 kB
  • sloc: python: 17,488; makefile: 114; sh: 39; javascript: 7
file content (17 lines) | stat: -rwxr-xr-x 357 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
"""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) -> None:
        super().__init__()
        self.remove_settable('debug')


if __name__ == '__main__':
    import sys

    c = MyApp()
    sys.exit(c.cmdloop())