Skip to content

Commit a872e5e

Browse files
committed
Fix broken python_scripting.py example
1 parent 9659dd7 commit a872e5e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/python_scripting.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
import os
2525

2626
import cmd2
27-
from cmd2 import (
28-
ansi,
29-
)
27+
from cmd2 import ansi
3028

3129

3230
class CmdLineApp(cmd2.Cmd):
@@ -41,7 +39,7 @@ def __init__(self):
4139
def _set_prompt(self):
4240
"""Set prompt so it displays the current working directory."""
4341
self.cwd = os.getcwd()
44-
self.prompt = ansi.style(f'{self.cwd} $ ', fg='cyan')
42+
self.prompt = ansi.style(f'{self.cwd} $ ', fg=ansi.Fg.CYAN)
4543

4644
def postcmd(self, stop: bool, line: str) -> bool:
4745
"""Hook method executed just after a command dispatch is finished.

0 commit comments

Comments
 (0)