# Path: cmd2/ansi.py
# class Fg(FgColor, Enum):
#     """
#     Create ANSI sequences for the 16 standard terminal foreground text colors.
#     A terminal's color settings affect how these colors appear.
#     To reset any foreground color, use Fg.RESET.
#     """
# 
#     BLACK = 30
#     RED = 31
#     GREEN = 32
#     YELLOW = 33
#     BLUE = 34
#     MAGENTA = 35
#     CYAN = 36
#     LIGHT_GRAY = 37
#     DARK_GRAY = 90
#     LIGHT_RED = 91
#     LIGHT_GREEN = 92
#     LIGHT_YELLOW = 93
#     LIGHT_BLUE = 94
#     LIGHT_MAGENTA = 95
#     LIGHT_CYAN = 96
#     WHITE = 97
# 
#     RESET = 39
# 
#     def __str__(self) -> str:
#         """
#         Return ANSI color sequence instead of enum name
#         This is helpful when using an Fg in an f-string or format() call
#         e.g. my_str = f"{Fg.BLUE}hello{Fg.RESET}"
#         """
#         return f"{CSI}{self.value}m"
# 
# Path: cmd2/constants.py
# MULTILINE_TERMINATOR = ';'


import cmd2
    import sys
from cmd2 import (
    Fg,
)
from cmd2.constants import (
    MULTILINE_TERMINATOR,
)
            self.poutput('Now we gots {0} doubloons'.format(self.gold))
        if self.gold < 0:
            self.poutput("Off to debtorrr's prison.")
            self.exit_code = 1
            stop = True
        return stop

    # noinspection PyUnusedLocal
    def do_loot(self, arg):
        """Seize booty from a passing ship."""
        self.gold += 1

    def do_drink(self, arg):
        """Drown your sorrrows in rrrum.

        drink [n] - drink [n] barrel[s] o' rum."""
        try:
            self.gold -= int(arg)
        except ValueError:
            if arg:
                self.poutput('''What's "{0}"?  I'll take rrrum.'''.format(arg))
            self.gold -= 1

    def do_quit(self, arg):
        """Quit the application gracefully."""
        self.poutput("Quiterrr!")
        return True

    def do_sing(self, arg):
        """Sing a colorful song."""

# Path: cmd2/ansi.py
# class Fg(FgColor, Enum):
#     """
#     Create ANSI sequences for the 16 standard terminal foreground text colors.
#     A terminal's color settings affect how these colors appear.
#     To reset any foreground color, use Fg.RESET.
#     """
# 
#     BLACK = 30
#     RED = 31
#     GREEN = 32
#     YELLOW = 33
#     BLUE = 34
#     MAGENTA = 35
#     CYAN = 36
#     LIGHT_GRAY = 37
#     DARK_GRAY = 90
#     LIGHT_RED = 91
#     LIGHT_GREEN = 92
#     LIGHT_YELLOW = 93
#     LIGHT_BLUE = 94
#     LIGHT_MAGENTA = 95
#     LIGHT_CYAN = 96
#     WHITE = 97
# 
#     RESET = 39
# 
#     def __str__(self) -> str:
#         """
#         Return ANSI color sequence instead of enum name
#         This is helpful when using an Fg in an f-string or format() call
#         e.g. my_str = f"{Fg.BLUE}hello{Fg.RESET}"
#         """
#         return f"{CSI}{self.value}m"
# 
# Path: cmd2/constants.py
# MULTILINE_TERMINATOR = ';'


# Path: examples/pirate.py
import cmd2
    import sys
from cmd2 import (
    Fg,
)
from cmd2.constants import (
    MULTILINE_TERMINATOR,
)

            self.poutput('Now we gots {0} doubloons'.format(self.gold))
        if self.gold < 0:
            self.poutput("Off to debtorrr's prison.")
            self.exit_code = 1
            stop = True
        return stop

    # noinspection PyUnusedLocal
    def do_loot(self, arg):
        """Seize booty from a passing ship."""
        self.gold += 1

    def do_drink(self, arg):
        """Drown your sorrrows in rrrum.

        drink [n] - drink [n] barrel[s] o' rum."""
        try:
            self.gold -= int(arg)
        except ValueError:
            if arg:
                self.poutput('''What's "{0}"?  I'll take rrrum.'''.format(arg))
            self.gold -= 1

    def do_quit(self, arg):
        """Quit the application gracefully."""
        self.poutput("Quiterrr!")
        return True

    def do_sing(self, arg):
        """Sing a colorful song."""

        self.poutput(cmd2.ansi.style(arg, fg=Fg[self.songcolor.upper()]))