Skip to content

Fix broken python_scripting.py example #1392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions examples/python_scripting.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
import os

import cmd2
from cmd2 import (
ansi,
)
from cmd2 import ansi


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

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