diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-10-11 15:20:46 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-10-13 17:17:30 -0400 |
commit | 55406f89849719c7493b7e7193cb1a0af73ab4fe (patch) | |
tree | 4eca765dc7b5883e2489a93dd41759b948f7739d /examples/basic.py | |
parent | e35ab9c169eccc7af3e4ec604e2ddd2e668bdc2c (diff) | |
download | cmd2-git-extended_colors.tar.gz |
Added support for 8-bit/256-colors with the cmd2.EightBitFg and cmd2.EightBitBg classes.extended_colors
Added support for 24-bit/RGB colors with the cmd2.RgbFg and cmd2.RgbBg classes.
Removed dependency on colorama.
Deprecated cmd2.fg. Use cmd2.StdFg instead.
Deprecated cmd2.bg. Use cmd2.StdBg instead.
Changed type of ansi.allow_style from a string to an ansi.AllowStyle Enum class.
Fixed bug where using choices on a Settable didn't verify that a valid choice had been entered.
Diffstat (limited to 'examples/basic.py')
-rwxr-xr-x | examples/basic.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/basic.py b/examples/basic.py index 8f507e03..167dee80 100755 --- a/examples/basic.py +++ b/examples/basic.py @@ -10,8 +10,8 @@ """ import cmd2 from cmd2 import ( - bg, - fg, + StdBg, + StdFg, style, ) @@ -27,7 +27,7 @@ class BasicApp(cmd2.Cmd): include_ipy=True, ) - self.intro = style('Welcome to PyOhio 2019 and cmd2!', fg=fg.red, bg=bg.white, bold=True) + ' 😀' + self.intro = style('Welcome to PyOhio 2019 and cmd2!', fg=StdFg.RED, bg=StdBg.WHITE, bold=True) + ' 😀' # Allow access to your application in py and ipy via self self.self_in_py = True |