summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-06-26 01:20:48 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-06-26 01:20:48 -0400
commite6f65e607c6ad2350dfce05f3d5080d0ffbe35f1 (patch)
treed777863fc4f5143bb4e53b83ed27b18734945a46 /cmd2/cmd2.py
parentdb984de915944d6421e70b2064400fb3c0ec2f9c (diff)
downloadcmd2-git-e6f65e607c6ad2350dfce05f3d5080d0ffbe35f1.tar.gz
Added bold and underline to style()
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index f89274f4..75cee55d 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -3792,7 +3792,6 @@ class Cmd(cmd.Cmd):
return
import shutil
- import colorama.ansi as ansi
from colorama import Cursor
# Sanity check that can't fail if self.terminal_lock was acquired before calling this function
@@ -3854,10 +3853,10 @@ class Cmd(cmd.Cmd):
# Clear each line from the bottom up so that the cursor ends up on the first prompt line
total_lines = num_prompt_terminal_lines + num_input_terminal_lines
- terminal_str += (ansi.clear_line() + Cursor.UP(1)) * (total_lines - 1)
+ terminal_str += (colorama.ansi.clear_line() + Cursor.UP(1)) * (total_lines - 1)
# Clear the first prompt line
- terminal_str += ansi.clear_line()
+ terminal_str += colorama.ansi.clear_line()
# Move the cursor to the beginning of the first prompt line and print the alert
terminal_str += '\r' + alert_msg
@@ -3914,8 +3913,7 @@ class Cmd(cmd.Cmd):
# Sanity check that can't fail if self.terminal_lock was acquired before calling this function
if self.terminal_lock.acquire(blocking=False):
try:
- import colorama.ansi as ansi
- sys.stderr.write(ansi.set_title(title))
+ sys.stderr.write(colorama.ansi.set_title(title))
except AttributeError:
# Debugging in Pycharm has issues with setting terminal title
pass