Skip to content

Commit 21c7f94

Browse files
authored
Fix broken python_scripting.py example (#1392)
1 parent 9659dd7 commit 21c7f94

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/python_scripting.py

+2-4
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)