File: remove_settable.py

package info (click to toggle)
cmd2 2.5.11%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 10,244 kB
  • sloc: python: 19,643; makefile: 73; sh: 67; javascript: 30
file content (20 lines) | stat: -rwxr-xr-x 366 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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())