diff options
Diffstat (limited to 'examples/submenus.py')
-rwxr-xr-x[-rw-r--r--] | examples/submenus.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/submenus.py b/examples/submenus.py index 52f26e08..1e3da0da 100644..100755 --- a/examples/submenus.py +++ b/examples/submenus.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# coding=utf-8 """ Create a CLI with a nested command structure as follows. The commands 'second' and 'third' navigate the CLI to the scope of the submenu. Nesting of the submenus is done with the cmd2.AddSubmenu() decorator. @@ -6,9 +7,6 @@ of the submenu. Nesting of the submenus is done with the cmd2.AddSubmenu() decor (Top Level)----second----->(2nd Level)----third----->(3rd Level) | | | ---> say ---> say ---> say - - - """ from __future__ import print_function import sys @@ -71,7 +69,6 @@ class SecondLevel(cmd2.Cmd): return [s for s in ['qwe', 'asd', 'zxc'] if s.startswith(text)] - @cmd2.AddSubmenu(SecondLevel(), command='second', aliases=('second_alias',), @@ -105,7 +102,6 @@ class TopLevel(cmd2.Cmd): return [s for s in ['qwe', 'asd', 'zxc'] if s.startswith(text)] - if __name__ == '__main__': root = TopLevel() |