diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2020-02-04 23:01:30 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2020-02-04 23:01:30 -0500 |
commit | 40722f10ace3107dcb4709008239ac8233ada30f (patch) | |
tree | 676edd56ec5ba1287cd4f38b66f2733eea597ee9 /examples/pirate.py | |
parent | 61dfcf613966355d68c01f2aa06f0158b54c1f20 (diff) | |
download | cmd2-git-40722f10ace3107dcb4709008239ac8233ada30f.tar.gz |
Added cmd2.utils.Settable to the cmd2 namespace and updated examples and docs
Diffstat (limited to 'examples/pirate.py')
-rwxr-xr-x | examples/pirate.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/pirate.py b/examples/pirate.py index eda3994e..acbab17c 100755 --- a/examples/pirate.py +++ b/examples/pirate.py @@ -25,7 +25,7 @@ class Pirate(cmd2.Cmd): self.songcolor = 'blue' # Make songcolor settable at runtime - self.settable['songcolor'] = 'Color to ``sing`` in (black/red/green/yellow/blue/magenta/cyan/white)' + self.add_settable(cmd2.Settable('songcolor', str, 'Color to ``sing``', choices=cmd2.ansi.FG_COLORS)) # prompts and defaults self.gold = 0 |