Beispiel #1
0
from traitlets.config.configurable import Configurable
from IPython.core import release
from IPython.utils import coloransi, py3compat
from traitlets import (Unicode, Instance, Dict, Bool, Int)

#-----------------------------------------------------------------------------
# Color schemes for prompts
#-----------------------------------------------------------------------------

InputColors = coloransi.InputTermColors  # just a shorthand
Colors = coloransi.TermColors  # just a shorthand

color_lists = dict(normal=Colors(),
                   inp=InputColors(),
                   nocolor=coloransi.NoColors())

PColNoColors = coloransi.ColorScheme(
    'NoColor',
    in_prompt=InputColors.NoColor,  # Input prompt
    in_number=InputColors.NoColor,  # Input prompt number
    in_prompt2=InputColors.NoColor,  # Continuation prompt
    in_normal=InputColors.NoColor,  # color off (usu. Colors.Normal)
    out_prompt=Colors.NoColor,  # Output prompt
    out_number=Colors.NoColor,  # Output prompt number
    normal=Colors.NoColor  # color off (usu. Colors.Normal)
)

# make some schemes as instances so we can copy them for modification easily:
PColLinux = coloransi.ColorScheme(
    'Linux',
Beispiel #2
0
from string import Formatter

from IPython.config.configurable import Configurable
from IPython.core import release
from IPython.utils import coloransi, py3compat
from IPython.utils.traitlets import (Unicode, Instance, Dict, Bool, Int)

#-----------------------------------------------------------------------------
# Color schemes for prompts
#-----------------------------------------------------------------------------

InputColors = coloransi.InputTermColors  # just a shorthand
Colors = coloransi.TermColors  # just a shorthand

color_lists = dict(normal=Colors(), inp=InputColors(), nocolor=coloransi.NoColors())

PColNoColors = coloransi.ColorScheme(
    'NoColor',
    in_prompt  = InputColors.NoColor,  # Input prompt
    in_number  = InputColors.NoColor,  # Input prompt number
    in_prompt2 = InputColors.NoColor, # Continuation prompt
    in_normal  = InputColors.NoColor,  # color off (usu. Colors.Normal)

    out_prompt = Colors.NoColor, # Output prompt
    out_number = Colors.NoColor, # Output prompt number

    normal = Colors.NoColor  # color off (usu. Colors.Normal)
    )

# make some schemes as instances so we can copy them for modification easily: