MLc@sdZddlmZddlmZmZmZmZmZm Z m Z m Z m Z m Z ddlmZddlmZdgZide 6d e 6d!e6d"ej6d#e6d$ej6d%e j6d&ej6d'ej6d(ej6d)ej6d*ej6d+ej6d,ej6d-ej6d.ej6d/ej6d0e6d1e 6d2e j 6d3e j!6d4e j"6d5e j#6d6e j6d7e6Z$defdYZ%dS(8s pygments.formatters.terminal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for terminal output with ANSI sequences. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. i(t Formatter( tKeywordtNametCommenttStringtErrortNumbertOperatortGenerictTokent Whitespace(t ansiformat(tget_choice_opttTerminalFormattertt lightgraytdarkgrayttealt turquoisetdarkbluetbluetpurpletfuchsiat darkgreentgreent_teal_t _turquoise_t _darkgreen_t_green_tdarkredtredtbrowns**s*purple*s *fuchsia*t_red_cBsAeZdZdZddgZgZdZdZdZRS(sP Format tokens with ANSI color sequences, for output in a text console. Color sequences are terminated at newlines, so that paging the output works correctly. The `get_style_defs()` method doesn't do anything special since there is no support for common styles. Options accepted: `bg` Set to ``"light"`` or ``"dark"`` depending on the terminal's background (default: ``"light"``). `colorscheme` A dictionary mapping token types to (lightbg, darkbg) color names or ``None`` (default: ``None`` = use builtin colorscheme). tTerminaltterminaltconsolecKsStj||t|dddgddk|_|jddpIt|_dS(Ntbgtlighttdarkt colorscheme(Rt__init__R tdarkbgtgettNonetTERMINAL_COLORSR'(tselftoptions((s@/usr/lib/python2.7/site-packages/pygments/formatters/terminal.pyR(Os cCsV|j rCt|drCt|drC|jrC|j|_ntj|||S(Ntencodingtisatty(R/thasattrR0Rtformat(R-t tokensourcetoutfile((s@/usr/lib/python2.7/site-packages/pygments/formatters/terminal.pyR2UscCsx|D]\}}|jj|}x,|dkrS|d }|jj|}q(W|r||j}|jd}x>|d D]2}|r|jt||n|jdqW|dr|jt||dqq|j|qWdS(Nis (R'R*R+R)tsplittwriteR (R-R3R4tttypetvaluetcolortspltline((s@/usr/lib/python2.7/site-packages/pygments/formatters/terminal.pytformat_unencoded]s    ( t__name__t __module__t__doc__tnametaliasest filenamesR(R2R<(((s@/usr/lib/python2.7/site-packages/pygments/formatters/terminal.pyR 8s   N(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(RR(s**s**(s*purple*s *fuchsia*(RR(R R (&R?tpygments.formatterRtpygments.tokenRRRRRRRRR R tpygments.consoleR t pygments.utilR t__all__tPreproctTypetWordtBuiltintFunctiont NamespacetClasst Exceptiont DecoratortVariabletConstantt AttributetTagtDeletedtInsertedtHeadingt SubheadingR,R (((s@/usr/lib/python2.7/site-packages/pygments/formatters/terminal.pyt s@F