%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib/python2.7/site-packages/paste/util/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyo

�
b�Nc=@sOdZddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=g=Zd>Zd?Zd@ZdAZdBZdCdDlZdCdDlZdCdDl	Z	dCdDl
Z
dCdDlZdCdDlZdCdDl
Z
dCdDlZdCdDlZydCdDlZWndCdDlZnXe
jZe
jZejZe
jZe
jZe
jdEZe
jdFZe
jdGZe
jdHZe
jdIZe
jdJZe
jdKZe
jdLZ e
jdMZ!e
jdNZ"e
jdOZ#e
jdPZ$e
jdQZ%e
jdRZ&e
jdSZ'e
jdTZ(e
jdUZ)e
jdVZ*e
jdWZ+e
jdXZ,e
jdYZ-e
jdZZ.e
jd[Z/e
jd\Z0e
jd]Z1e
jd^Z2e
jd_Z3e
jd`Z4e
jdaZ5idbe6dce,6dde+6dee6dfe6dge6dhe6die6dje6dke6dle6dme6dne6doe6dpe 6dqe!6dre"6dse#6dte$6due%6dve&6dwe'6dxe(6dye)6dze-6d{e.6d|e/6d}e06Z6ide6de,6de+6de6de6de6de6d	e6de6de6d
e6de6de6de6de 6de!6de"6de#6de$6de%6de&6de'6de(6de)6de-6d
e.6de/6de06de*6Z7id~dd~fe6d~dd~fe,6d~dd~fe+6d~dd~fe6d~dd~fe6d~dd~fe6d~dd~fe6d~dd~fe.6d~dd~fe-6d~dd~fe6d~dd~fe6d~dd~fe6d~dd~fe6d~dd~fe6d~dd~fe6d~dd~fe6d~dd~fe 6d~dd~fe!6d~dd~fe"6d~dd~fe#6d~dd~fe$6d~dd~fe%6d~dd~fe&6d~dd~fe'6d~dd~fe(6d~dd~fe)6d~dd~fe06d�dd~fe/6d�e*6Z8id�d�d~fe6d�dd~fe,6d�dd~fe+6d�d�d~fe6d~dd~fe6d�dd~fe6d�dd~fe6d�dd~fe.6d�dd~fe-6d�d�d~fe6d�d�d~fe6d�dd~fe6d�dd~fe6d�dd~fe6d~dd~fe6d~dd~fe6d~dd~fe 6d~dd~fe!6d~dd~fe"6d~dd~fe#6d~dd~fe$6d~dd~fe%6d~dd~fe&6d�dd~fe'6d�dd~fe(6d�dd~fe)6d~dd~fe06d�dd~fe/6d�e*6Z9id�d�d~fe6d�d�d~fe,6d�d�d~fe+6d�d�d~fe6d~d�d~fe6d~d�d~fe6d�d�d~fe6d�d�d~fe.6d�d�d~fe-6d~d�d~fe6d�d�d~fe6d�d�d~fe6d�d�d~fe6d�d�d~fe6d~d�d~fe6d~d�d~fe6d~d�d~fe 6d~d�d~fe!6d~d�d~fe"6d~d�d~fe#6d~d�d~fe$6d~d�d~fe%6d~d�d~fe&6d~d�d~fe'6d~d�d~fe(6d~d�d~fe)6d~d�d~fe06d�d�d�fe/6de*6Z:id~d�d~fe6d�d�d~fe,6d�d�d~fe+6d�d�d~fe6d~d�d~fe6d�d�d~fe6d�d�d~fe6d�d�d~fe.6d�d�d~fe-6d�d�d�fe6d�d�d�fe6d�d�d~fe6d�d�d~fe6d�d�d~fe6d~d�d~fe6d~d�d~fe6d~d�d~fe 6d~d�d~fe!6d~d�d~fe"6d~d�d~fe#6d~d�d~fe$6d~d�d~fe%6d~d�d~fe&6d~d�d~fe'6d~d�d~fe(6d~d�d~fe)6d~d�d~fe06d�d�d�fe/6de*6Z;id�d�d~fe6d�d�d~fe,6d�d�d~fe+6d�dd~fe6d~d�d~fe6d�d�d~fe6d�dd~fe6d�dd~fe.6d�dd~fe-6d~d�d~fe6d~d�d~fe6d�d�d~fe6d�d�d~fe6d�d�d~fe6d~d�d~fe6d~d�d~fe6d~d�d~fe 6d~d�d~fe!6d~d�d~fe"6d~d�d~fe#6d~d�d~fe$6d~d�d~fe%6d~d�d~fe&6d~d�d~fe'6d~d�d~fe(6d~d�d~fe)6d~dd~fe06d�dd~fe/6d�e*6Z<id�d�d~fe6d~d�d~fe,6d~d�d~fe+6d~dd~fe6d~dd~fe6d~dd~fe6d~dd~fe.6d~dd~fe-6d~d�d~fe6d~d�d~fe6d~d�d~fe6d~d�d~fe6d~d�d~fe6d~d�d~fe6d~d�d~fe6d~d�d~fe 6d~d�d~fe!6d~d�d~fe"6d~d�d~fe#6d~d�d~fe$6d~d�d~fe%6d~d�d~fe&6d~d�d~fe'6d~d�d~fe(6d~d�d~fe)6d~dd~fe06d�dd~fe/6d�e*6Z=id�d�d~fe6d�d�d~fe,6d�d�d~fe+6d~dd~fe6d~d�d~fe6d~d�d~fe6d~dd~fe6d~dd~fe.6d~dd~fe-6d~d�d~fe6d~d�d~fe6d�d�d~fe6d�d�d~fe6d�d�d~fe6d~d�d~fe6d~d�d~fe6d~d�d~fe 6d~d�d~fe!6d~d�d~fe"6d~d�d~fe#6d~d�d~fe$6d~d�d~fe%6d~d�d~fe&6d~d�d~fe'6d~d�d~fe(6d~d�d~fe)6d~d�d~fe06d�dd~fe/6d�e*6Z>id�d�d~fe6d~dd~fe,6d~dd~fe+6d~dd~fe6d~dd~fe6d~dd~fe6d~dd~fe6d~dd~fe.6d~dd~fe-6d�d�d~fe6d�d�d~fe6d~dd~fe6d�d�d~fe6d�d�d~fe6d�d�d~fe6d�d�d~fe6d�d�d~fe 6d�d�d~fe!6d�d�d~fe"6d�d�d~fe#6d�d�d~fe$6d�d�d~fe%6d�d�d~fe&6d�d�d~fe'6d�d�d~fe(6d�d�d~fe)6d~dd~fe06d�dd~fe/6d�e*6Z?e<Z@d��ZAd��ZBd�d�d��ZCeDd~d�eDeDd�eDd��ZEd~eDd�eDeDd�eDd��ZFeDd~d�eDeDd�eDd��ZGeDd~d�eDeDd�eDd��ZHeDd~d�eDeDd�eDd��ZIeDd~d�eDeDd�d�dEeDd��	ZJeDd�eDeDd�eDd��ZKeDeDd�d�d�eDeDd�eDd��	ZLeDeDd�d�d�eDeDeDd�dEd��
ZMe<d�d�dEd�jN�d�jN�d�d��ZOeDe<d�d�dEd�jN�d�jN�d�dEd�d��
ZPd��ZQd��ZRd��ZSd��ZTd��ZUd�eVfd���YZWd�eWfd���YZXd�eWfd���YZYd0eZfd���YZ[e\d�krKeB�ndDS(�s)
PySourceColor: color Python source code
t
ERRORTOKENtDECORATOR_NAMEt	DECORATORtARGSt
EXTRASPACEtNAMEtNUMBERtOPERATORtCOMMENTt
MATH_OPERATORt
DOUBLECOMMENTt
CLASS_NAMEtDEF_NAMEtKEYWORDtBRACKETStSINGLEQUOTEt
SINGLEQUOTE_Rt
SINGLEQUOTE_UtDOUBLEQUOTEt
DOUBLEQUOTE_Rt
DOUBLEQUOTE_UtTRIPLESINGLEQUOTEtTEXTtTRIPLESINGLEQUOTE_RtTRIPLESINGLEQUOTE_UtTRIPLEDOUBLEQUOTEtTRIPLEDOUBLEQUOTE_RtTRIPLEDOUBLEQUOTE_UtPAGEBACKGROUNDt
LINENUMBERt	CODESTARTtCODEENDtPYtTOKEN_NAMEStCSSHOOKtnulltmonotlitetdarktdark2t	pythonwintidletviewcvstUsagetclit
str2stdouttpath2stdouttParsertstr2filetstr2htmltstr2csst
str2markupt	path2filet	path2htmltconverttwalkdirt
defaultColorstshowpagetpageconvertt
tagreplacet
MARKUPDICTt
PySourceColors2.1as
25 April 2005sM.E.Farmer Jr.s�This was originally based on a python recipe
submitted by J�rgen Hermann to ASPN. Now based on the voices in my head.
M.E.Farmer 2004, 2005
Python license
i����Niiiiiiiii	i
iii
iiiiiiiiiiiiiiiitpy_errtpy_decntpy_dectpy_argstpy_nametpy_numtpy_optpy_comtpy_dcomtpy_clsntpy_defntpy_keytpy_sqtpy_sqrtpy_squtpy_dqtpy_dqrtpy_dqutpy_tsqtpy_tsqrtpy_tsqutpy_tdqtpy_tdqrtpy_tdqutpy_bratpy_moptpy_lnumtpy_textts#000000s
>ti#555555s#FFFFFFss#FF0000s#FF8080tbutbs#555555tis#999999s#FFBBAAs#CC5511s#DDDDFFs#DDDDDDs#FF0000s#FAF785s#45FCA0s#A7C7A9s#B666FDs#EBAE5Cs#8680FFs#F8BAFEs#FF80C0s#FF9595s#B3FFFFs
>mi#555555s#bbccbbs#333333s#C0C0C0s#00FF00s#FF090Fs#EE7020s#FFB90Fs#D0D000s#522000s#DD4080s#FF8040s#4726d1s#8080C0s#ADB9F1s#00C1C1s#33E3E3s#BB4422s#3333AFs#DD2200s#007F00s#608060s#0000DFs#9C7A00s#0000AFs#600080s#A0008As#337799s#1166AAs#900090s#FF7700s#DD0000s#0000FFs#00AA00s#DD0080s#000080s#303030s#008080s#7F7F7Fs#007F7Fs#808000s#b22222s#0000ffs#a020f0s#bc8f8fcCs d}|tGHtjd�dS(Ns
 -----------------------------------------------------------------------------
  PySourceColor.py ver: %s
 -----------------------------------------------------------------------------
  Module summary:
     This module is designed to colorize python source code.
         Input--->python source
         Output-->colorized (html, html4.01/css, xhtml1.0)
     Standalone:
         This module will work from the command line with options.
         This module will work with redirected stdio.
     Imported:
         This module can be imported and used directly in your code.
 -----------------------------------------------------------------------------
  Command line options:
     -h, --help
         Optional-> Display this help message.
     -t, --test
         Optional-> Will ignore all others flags but  --profile
             test all schemes and markup combinations
     -p, --profile
         Optional-> Works only with --test or -t
             runs profile.py and makes the test work in quiet mode.
     -i, --in, --input
         Optional-> If you give input on stdin.
         Use any of these for the current dir (.,cwd)
         Input can be file or dir.
         Input from stdin use one of the following (-,stdin)
         If stdin is used as input stdout is output unless specified.
     -o, --out, --output
         Optional-> output dir for the colorized source.
             default: output dir is the input dir.
         To output html to stdout use one of the following (-,stdout)
         Stdout can be used without stdin if you give a file as input.
     -c, --color
         Optional-> null, mono, dark, dark2, lite, idle, pythonwin, viewcvs
             default: dark 
     -s, --show
         Optional-> Show page after creation.
             default: no show
     -m, --markup
         Optional-> html, css, xhtml
             css, xhtml also support external stylesheets (-e,--external)
             default: HTML
     -e, --external
         Optional-> use with css, xhtml
             Writes an style sheet instead of embedding it in the page
             saves it as pystyle.css in the same directory.
             html markup will silently ignore this flag.
     -H, --header
         Opional-> add a page header to the top of the output
         -H
             Builtin header (name,date,hrule)
         --header
             You must specify a filename.
             The header file must be valid html
             and must handle its own font colors.
             ex. --header c:/tmp/header.txt
     -F, --footer
         Opional-> add a page footer to the bottom of the output
         -F 
             Builtin footer (hrule,name,date)
         --footer
             You must specify a filename.
             The footer file must be valid html
             and must handle its own font colors.
             ex. --footer c:/tmp/footer.txt  
     -l, --linenumbers
         Optional-> default is no linenumbers
             Adds line numbers to the start of each line in the code.
    --convertpage
         Given a webpage that has code embedded in tags it will
             convert embedded code to colorized html. 
             (see pageconvert for details)
 -----------------------------------------------------------------------------
  Option usage:
   # Test and show pages
      python PySourceColor.py -t -s
   # Test and only show profile results
      python PySourceColor.py -t -p
   # Colorize all .py,.pyw files in cwdir you can also use: (.,cwd)
      python PySourceColor.py -i .
   # Using long options w/ =
      python PySourceColor.py --in=c:/myDir/my.py --color=lite --show
   # Using short options w/out =
      python PySourceColor.py -i c:/myDir/  -c idle -m css -e
   # Using any mix
      python PySourceColor.py --in . -o=c:/myDir --show
   # Place a custom header on your files
      python PySourceColor.py -i . -o c:/tmp -m xhtml --header c:/header.txt
 -----------------------------------------------------------------------------
  Stdio usage:
   # Stdio using no options
      python PySourceColor.py < c:/MyFile.py > c:/tmp/MyFile.html
   # Using stdin alone automatically uses stdout for output: (stdin,-)
      python PySourceColor.py -i- < c:/MyFile.py > c:/tmp/myfile.html
   # Stdout can also be written to directly from a file instead of stdin
      python PySourceColor.py -i c:/MyFile.py -m css -o- > c:/tmp/myfile.html
   # Stdin can be used as input , but output can still be specified
      python PySourceColor.py -i- -o c:/pydoc.py.html -s < c:/Python22/my.py
 _____________________________________________________________________________
 i(t__version__tsystexit(tdoc((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR+7sf	cCs�yPtjtjddddddddd	d
ddd
dddg�\}}Wntjk
rmt�nXd4}d4}d4}d}d4}d4}d}d}	d}
d}d}d}
d4}x�|D]�\}}|dDkr�t�tj�n|dEkr|}n|dFkr4|}|dGkr4tj�}q4n|dHkrId}	n|dIkr^d}
n|dJkrsd}n|dKkr�d}
n|dLkr�d}n|dMkr�d}n|dNkr�t	|�}n|dOkr�d}n|dPkr�t	|�}n|d-krd.}n|dQkr-t	|�}n|d0krBd.}n|dRkr�yt
�j|j��}Wq�t
j�t�q�Xq�q�W|r�|r�d3d4l}|jd5|	|
f�q�t|	|
�n�|dSks�|dTkr|dUkrAtjj|�r5t|d9|d:|d|d;|d<|d=|�q�td>�q�y�tjj�r_td?�n�|dVkr�ttjj�d9|d:|d;|d<|d|d=|�n=ttjj�d@|d|	d:|d;|d<|d|d=|�Wq�t
j�t�q�Xn�tjj|�r�|
rDt|dA|d9|d|	d:|d|�q�tdB|dC|d9|d|	d:|d|
d;|d<|d|d=|�
ntd>�t�d4S(Ws)Handle command line args and redirectionsishseqtplHFi:o:c:m:h:f:thelptshowtquietttesttexternaltlinenumberstconvertpagetprofilesinput=soutput=scolor=smarkup=sheader=sfooter=thtmlis-hs--helps-os--outputs--outs-is--inputs--int.tcwds-ss--shows-qs--quiets-ts--tests
--convertpages-ps	--profiles-es
--externals-ms--markups-ls
--linenumberss--headers-HRZs--footers-Fs-cs--colori����Ns_test(show=%s, quiet=%s)t-tstdintstdouttcolorstmarkuptheadertfootertformsFile does not exists!sPlease check input!toutfiletouttsourcetoutdir(s-hs--help(s-os--outputs--out(s-is--inputs--in(Rkscwd(s-ss--show(s-qs--quiet(s-ts--test(s
--convertpage(s-ps	--profile(s-es
--external(s-ms--markup(s-ls
--linenumbers(s--header(s--footer(s-cs--color(NRmsstdin(Rmsstdout(NRmsstdin(NRmsstdout(tgetoptR_targvtGetoptErrorR+tNoneR`tostgetcwdtstrtglobalstgettlowert	tracebackt	print_excRitrunt_testtpathtisfileR.t	PathErrorRntisattyt
InputErrorR-treadR0texistsR:R6(toptstargstinputtoutputtcolorschemeRqRrRsRgRcRdReRiRhRttota((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR,�s�%
										


	icCs*tjd}|jd�st|dtd|d|�t|dtd|ddd|�t|d	td|d|�t|d
td|ddd|�t|dtd|d|�t|dtd|ddd|d
ddddd�t|dtd|ddd|�t|dtd|d|�t|dtd|ddd|dd�t|dtd|d|�t|dtd|ddd|�t|dtd|ddd|d
ddddddd�t|dt	d|d|�t|dt	d|ddd|�t|dt
d|d|dd�t|dt
d|ddddd|�t|dtd|d|�t|d td|ddd|�d!}tj
jd"�}t||d#tdddd$d|�td%||�tj
jd&�}t||d#tddd|�td%||�nt�d'S((s�Test the parser and most of the functions.

       There are 19 test total(eight colorschemes in three diffrent markups,
       and a str2file test. Most functions are tested by this.
    is.exes/tmp/null.htmlRcRds/tmp/null_css.htmlRqtcsss/tmp/mono.htmls/tmp/mono_css.htmls/tmp/lite.htmls/tmp/lite_css.htmlRrRZRsRgis/tmp/lite_xhtml.htmltxhtmls/tmp/dark.htmls/tmp/dark_css.htmls/tmp/dark2.htmls/tmp/dark2_css.htmls/tmp/dark2_xhtml.htmlRtRfs/tmp/idle.htmls/tmp/idle_css.htmls/tmp/viewcvs.htmls/tmp/viewcvs_css.htmls/tmp/pythonwin.htmls/tmp/pythonwin_css.htmls"""This is a test of decorators and other things"""
# This should be line 421...
@whatever(arg,arg2)
@A @B(arghh) @C
def LlamaSaysNi(arg='Ni!',arg2="RALPH"):
   """This docstring is deeply disturbed by all the llama references"""
   print '%s The Wonder Llama says %s'% (arg2,arg)
# So I was like duh!, and he was like ya know?!,
# and so we were both like huh...wtf!? RTFM!! LOL!!;)
@staticmethod## Double comments are KewL.
def LlamasRLumpy():
   """This docstring is too sexy to be here.
   """
   u"""
=============================
A M��se once bit my sister...
=============================
   """
   ## Relax, this won't hurt a bit, just a simple, painless procedure,
   ## hold still while I get the anesthetizing hammer.
   m = {'three':'1','won':'2','too':'3'}
   o = r'fishy\fishy\fishy/fish\oh/where/is\my/little\..'
   python = uR""" 
 No realli! She was Karving her initials �n the m��se with the sharpened end  
 of an interspace t��thbrush given her by Svenge - her brother-in-law -an Oslo
 dentist and star of many Norwegian m�vies: "The H�t Hands of an Oslo         
 Dentist", "Fillings of Passion", "The Huge M�lars of Horst Nordfink"..."""
   RU"""142 MEXICAN WHOOPING LLAMAS"""#<-Can you fit 142 llamas in a red box?
   n = u' HERMSGERV�RDENBR�TB�RDA ' + """ YUTTE """
   t = """SAMALLNIATNUOMNAIRODAUCE"""+"DENIARTYLLAICEPS04"
   ## We apologise for the fault in the
   ## comments. Those responsible have been
   ## sacked.
   y = '14 NORTH CHILEAN GUANACOS \
(CLOSELY RELATED TO THE LLAMA)'
   rules = [0,1,2,3,4,5]
   print ys/tmp/strtest_lines.htmlRpi�s
  wrote %ss/tmp/strtest_nolines.htmlN(R_RztendswithR4R#R$R%R&R'R)R*R(R}R�tabspathR0t
_printinfoR+(RcRdtfitteststrthtmlPath((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR�sZ








%
RjcCs;t|d|d|d|d|d|d|�j|�dS(s�Converts a code(string) to colorized HTML. Writes to stdout.

       form='code',or'snip' (for "<pre>yourcode</pre>" only)
       colors=null,mono,lite,dark,dark2,idle,or pythonwin
    RpttitleRqRrRsRgN(R/tformat(tsourcestringRpR�RqRrRsRgRt((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR-usc	CsMt|�j�}t|d|d|d|d|d|d|�j|�dS(s�Converts code(file) to colorized HTML. Writes to stdout.

       form='code',or'snip' (for "<pre>yourcode</pre>" only)
       colors=null,mono,lite,dark,dark2,idle,or pythonwin
    RpR�RqRrRsRgN(topenR�R/R�(	t
sourcepathR�RpRqRrRsRgRtR�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR.�sc	Cs`tj�}t|d|d|d|d|d|d|d|�j|�|jd�|j�S(	s�Converts a code(string) to colorized HTML. Returns an HTML string.

       form='code',or'snip' (for "<pre>yourcode</pre>" only)
       colors=null,mono,lite,dark,dark2,idle,or pythonwin
    RpR�RvRqRrRsRgi(tStringIOR/R�tseekR�(	R�RpR�RqRrRsRgRttstringIO((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR1�s
R�c
Cs�|j�dkrd}ntj�}t|d|d|d|d|d|d|d	|�}	|	j|�|jd
�|d
kr�|	jdd�|j�fSd
|j�fSd
S(s�Converts a code string to colorized CSS/HTML. Returns CSS/HTML string
       
       If form != None then this will return (stylesheet_str, code_str)
       colors=null,mono,lite,dark,dark2,idle,or pythonwin
    R�R�RpR�RvRqRrRsRgiRfiN(scsssxhtml(R�R�R/R�R�R|t
_sendCSSStyleR�(
R�RpR�RqRrRsRgRtR�tparse((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR2�s		

R�cCs�|j�dkrLd	t|d|d|d|d|d|d|d|�fSt|d|d|d|d|d|d|d|�Sd	S(
sD Convert code strings into ([stylesheet or None], colorized string) RjRpR�RrRsRqRgRtN(R�R|R1R2(R�RpR�RqRrRsRgRt((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR3�scCs�t|d|ddd|d|d|d|d|
�\}}t|d	�}
|
j|�|
j�|dkr�|	r�tjj|�}tjj|d
�}t|d	�}
|
j|�|
j�n|r�t	|�ndS(s[Converts a code string to a file.

       makes no attempt at correcting bad pathnames
    RpR�RZRqRrRsRgRttwtspystyle.cssN(
R3R�t
writelinestcloseR|R}R�tdirnametjoinR9(R�RuRpR�RqRrRsRgRctdosheetRtR�Rjtftdirtoutcss((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR0�s



c	Csotj�}t|�j�}t||d|d|d|d|d|d|�j|�|jd�|j�S(s�Converts code(file) to colorized HTML. Returns an HTML string.

       form='code',or'snip' (for "<pre>yourcode</pre>" only)
       colors=null,mono,lite,dark,dark2,idle,or pythonwin
    R�RvRqRrRsRgi(R�R�R�R/R�R�(	R�RpRqRrRsRgRtR�R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR5�s
c


Cs5d}
tjj|�sktjj|�r_|
d7}
t|||||||	||||
�q1td�n�t|�}|dkr$|dkr�tjj|�ddkr�tjj	|�d}q�nx@|D]8}|
d7}
t|||||||	||||
�q�Wt
dt|
�|�n
t
d|�dS(s{Takes a file or dir as input and places the html in the outdir.

       If outdir is none it defaults to the input dir
    iisFile does not exist!RZsCompleted colorizing %s files.sNo files to convert in dir.N(R}R�tisdirR�R4R�R7R|tsplitexttsplitR�R(
RwRxRpRcRqRdRrRsRgRttcounttfileListtitem((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR6�s$


c	Cs�|dkr|d}n�tjj|�ddkr�tjj|�sWtj|�ntjj|�}tjj||�d}n>tjj|�d}
tjj|
�s�tj|
�n|}tjj	|�}t
|�j�}t|||t
|d�||||	�}|j
|�td||�|dkr�|
dkr�|dkr�|jdd�}tjjtjj|�d	�}t
|d�}|j|�|j�td
||�n|r�t|�n|S(s$ Converts python source to html files.htmliRZiR�s
  wrote %sRfRjspystyle.csss    wrote %sN(R|R}R�R�R�tmakedirstbasenameR�R�R�R�R�R/R�R�R�R�twriteR�R9(t
sourcePathRvRpRcRqRdRtRrRsRgR�R�t
sourceNameRxRwR�tcssSheettcssPathR�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR4	s6

$!


s<PY>s</PY>spystyle.csscCsi|j�dkrRd}||}	|j|	�dkrR|jd|	d�}qRn|j|�}
|j|�}|
rP|
|kr=x�t|
�D]�}|j|�}
|j|�}||
t|�|!}t|�}t|d|d|d|d	d
�\}	}||
 }||t|�}dj|||g�}q�WqPt	d||�n|s_d
}	n|	|fS(sBThis is a helper function for pageconvert. Returns css, page.
    Rjs9<link rel="stylesheet" href="%s" type="text/css"/></head>i����s</head>iRpRgRqRttembedRZsTag mismatch!
Check %s,%s tagsN(R�tfindtreplaceR�trangetlentunescapeR3R�R�R|(t	sourcestrRpRqRgR�ttagstartttagendt
stylesheettlinkR�t	starttagstendtagst_t	datastarttdataendtdatatstarttend((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR;4s.

	tpystylecCs�|d
kr!tjj|�}nt|d�j�}td|d|d|d|d|d|d|d	|�\}}
|
s�tjjtjj|d
tjj	|���}tjj
|�s�ytjtjj|��Wq�q�Xnt|d�}|j|
�|j
�|rdtjjtjj|d
d|��}t|d�}|j|�|j
�n|	r�ytj|�Wq�tj�q�Xn|S||
fSd
S(sdThis function can colorize Python source

       that is written in a webpage enclosed in tags.
    trR�RpRqRgR�R�R�R�ttmptws%s.cssN(R|R}R�R�R�R�R;R�R�R�R�R�R�R�t	startfileR�R�(R�RvRpRqRgR�R�R�R�Rct	returnstrtinfileR�tpagetnewpathtytcsspathtx((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR:Rs<



cCsstjj|d�}tj|�}g|D]*}|jd�sO|jd�r+|^q+}|gkrk|SdSdS(s�Return a list of .py and .pyw files from a given directory.

       This function can be written as a generator Python 2.3, or a genexp
       in Python 2.4. But 2.2 and 2.1 would be left out....
    s	*.[p][y]*s.pys.pywN(R}R�R�tglobR�R|(R�tGLOB_PATTERNtpathlistR�t
filterlist((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR7|s
cCsAy)ddl}|jtjj|��Wntj�nXdS(s Helper function to open webpagesi����N(t
webbrowsertopen_newR}R�R�R�R�(R�R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR9�s
cCs|s|GHndS(sHelper to print messagesN((tmessageRd((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR��scCs:|jdd�}|jdd�}|jdd�}|S(s+escape text for html. similar to cgi.escapet&s&amp;t<s&lt;t>s&gt;(R�(ttext((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pytescape�scCsL|jdd�}|jdd�}|jdd�}|jdd�}|S(	sunsecape escaped texts&quot;t"s&gt;R�s&lt;R�s&amp;R�(R�(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR��s
tPySourceColorErrorcBs#eZdd�Zd�ZeZRS(RZcCs||_tj||�dS(N(t_msgt	Exceptiont__init__(tselftmsg((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR��s	cCs|jS(N(R�(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt__repr__�s(t__name__t
__module__R�R�t__str__(((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR��s	R�cBseZd�ZRS(cCstj|d|�dS(NsPath error! : %s(R�R�(R�R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR��s	(R�R�R�(((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR��sR�cBseZd�ZRS(cCstj|d|�dS(NsInput error! : %s(R�R�(R�R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR��s	(R�R�R�(((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR��scBs�eZdZedejdeedd�Zed�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+RS(*s)MoinMoin python parser heavily chopped :)RZRjic		CsX|dkrt}n|j�j�|_tjj|�|_||_	d|_
d|_d|_d|_
d|_d|_d|_|j�|_||_||_||_d|_d|_d|_d|_d|_dj�|_dj�|_d|_|jjtd�|_ t!|�|_"|_#|dkrKd|_$n	d|_$dS(s&Store the source text & set some flagsRZiit
___line___t___start___N(%R|R8t
expandtabstrstriptrawR}R�R�R�RvtlinetlasttexttargFlagt	classFlagtdefFlagt
decoratorFlagRftupperRqRpRrRstdoArgstdoNamest	doMathOpst
doBracketstdoURLt
LINENUMHOLDERt	LINESTARTtskipR�Rt
extraspacetabst
dolinenumstlinenumtnumberlinks(	R�R�RpR�RvRqRrRsRg((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR��s:																		cCsx|dkrd|_nB|dkr9d|_d|_n!|dkrQd|_nd|_ddg|_d}|jr�|jd|j}n
d|j}g}|jjd�}x�|D]�}|jd	�s�|jd
�s�|jd�r�|j	|�q�|j
dkr,|j	|jd||�q�|j	||�q�Wdj|�d|_x6|jj
d|�d}|s}Pn|jj	|�qZ|jj	t|j��d|_tj|j�}|jr�|j�n
|j�ytj|j|�WnVtjk
rS}|d}	|dd}
|jjd|	|j|j|
f�nX|jrj|j�n
|j�dS(s#Parse and send the colorized sourcetsniptcodeiR�iRft RZs#$#s#%#s#@#tXHTMLtCSSs
s<h3>ERROR: %s</h3>%s
N(Rscode(RR(taddEndsRftlinesR	RRR�t
splitlinest
startswithtappendRqRR�R�R�tposR�t_doPageStartt_doSnippetStartttokenizetreadlinet
TokenErrorRvR�t
_doPageEndt
_doSnippetEnd(R�RtRR�tnewlinesRtlR�texR�R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR��sZ			

		


 	
cCs	|\}}|\}}	||_|j}
|j||}|t|�|_|tjtjfkr�d|_|_	|j
dIkr�|jjd�n|jjd�dS||
kr�|j
|
|!j�r0|j|jkr|j|jkr|jj|j
|
|!�q�|jj|j
|
d|!�q�|j
|
|!jd�|
}|jj|j
|
|!�t|d	|j
�td�|jd7_|j
dJkr�|jjd�n|jj|j
|d|!�n|tjtjfkr�||_dStj|kr|tjkr|d
kr>t}d|_|_	q5|jr�|dkrh|j	rhd|_	q�|d
kr�d|_	q�n|jr�|dKkr�t}q5|jr�|dLkr�t}q5t}|dkr�|j	dkr�d|_	q5|d$kr5|j	dkr5d|_	q5n|t kr�t!j"|�r�t#}|dMkr5|d%kr||jd%� j$d'�rd|_%|_	q�|d&kr�||jd&� j$d'�r�d|_&|_	q�t'}q5nn|j%s�|j&s�|jr?|j(r?|j%rd|_%t)}q5|j&r!d|_&t*}q5|jr5d|_t+}q5n�|tj,kr�|j-�}
|
d( d)krst.}nS|
d* d+kr�t/}n:|
d* d,ks�|
d- d.kr�t0}n|
d d/kr�t1}n�|
d d0kr�t2}n�|
d d1ks|
d( d2krt3}n�|
d( d3kr)t4}n�|
d* d4krBt5}n�|
d* d5ksb|
d- d6krkt6}n[|
d d7kr�t7}nB|
d d8kr�t8}n)|
d d9ks�|
d( d:kr�t9}n|jj-�d;kr5t'}q5nN|t:krf|d d<krt;}n�|d( d=kr8t<}d>|_=|d(}nX|d( d?krdt<}d@|_=|d(}n,|d( dAkr�t<}dB|_=|d(}n|j>r5|jdC�}|dDkrc|| }||d*}|jd$�}|jd�}||d}|| }|dDkrG|j?d$d�}dE||d|dj@�|f}q`dE||||f}qcq5n�|t'kr�|j	r�|j�r�|jj|�dS|j�r�|jAr�d|_AdS|jj|�dSq5|d
kr5t}d|_|_	q5n9|j	dkr5|t kr5|dFkr5|jr5tB}n||j|jgkr�tC}||jkrl|jDs{||jkr�d|_Aq�n|dGkr�dS||_|t;t:fkr�|jdH�dDkr�tE|�}q�n|t<kr�ntE|�}t|d	|j
�||�dS(Ns3Token handler. Order is important do not rearrange.iRRs</span>s
Nis\s_send%sTextt@t(it:t[t]t)t{t}s*=s**=s-=s+=s|=s%=s>>=s<<=t=s^=s/=t+Rms**t*t/t%t,tclasstdefRkis"""isr"""su"""isur"""R�sr"su"sur"s'''sr'''su'''sur'''t'sr'su'sur'trus##s#$#tSPANs#%#tDIVs#@#tRAWsurl(i����s%s<a href="%s">%s</a>%sR|RZs<a href=(sXHTMLsCSS(sXHTMLsCSS(R$R%R"R&R'R((s*=s**=s-=s+=s|=s%=s>>=s<<=R)s^=s/=R*Rms**R+R,R-(R/R0(FR�RRR�ttokentNEWLINERtNLR�R�RqRvR�R�tisspaceR�RRR�tgetattrRR
tINDENTtDEDENTtLPARtOPRR�RRRR	Rtkeywordt	iskeywordR
R�R�R�RRRRRtSTRINGR�RRRRRRRRRRRRRR
RttextFlagRR�tlstripRRRR	R�(R�ttoktypettoktextt.3t.4R�tsrowtscolterowtecoltoldpostnewpostslashR�turl_postbeforeturlt
splitpointtendpointtafterturlparts((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt__call__2sH		!!																												
	
	
	

$					cCsE|jdkr"|jjd�n|jj|jjtd��dS(NtHTMLs<pre>
s<pre class="py">
(RqRvR�RpR�R(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR3scCs#|jj|jjtd��dS(Ns</pre>
(RvR�RpR�R(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR;scCsGy)t|d�}|j�}|j�Wntj�d}nX|S(NR�RZ(R�R�R�R�R�(R�tfilepatht_filetcontent((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_getFileAs

cCst|d|j��dS(Ns
_do%sStart(R:Rq(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyRKscCs�|jdkr�|jjd�dksW|jjd�dksW|jjd�dkrq|jj|jd�q�|jdkr�|j|j�|_nt|d|j��ndS(Ns#$#i����s#%#iRZs_do%sHeader(RrR|R�RvR�R[R:Rq(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt
_doPageHeaderNscCs�|jdkr�|jjd�dksW|jjd�dksW|jjd�dkrq|jj|jd�q�|jdkr�|j|j�|_nt|d|j��ndS(Ns#$#i����s#@#s#%#iRZs_do%sFooter(RsR|R�RvR�R[R:Rq(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt
_doPageFooterYscCst|d|j��dS(Ns_do%sEnd(R:Rq(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyRdscCs/|j}|jd7_t|�jd�dS(NiiR(R
Rtrjust(R�tnum((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_getLineNumberjs	cCs|jj||jt�dS(Ni(RpR�R(R�tkey((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_getTagsoscCs=|jj||jt�d}|d dkr9d}n|S(Nit#s#000000(RpR�R(R�Ratcolor((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt
_getForeColorss 	cCs|jj||jt�dS(Ni(RpR�R(R�Ra((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt
_getBackColorzscCs|jjtd�S(Ns#FFFFFF(RpR�R(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt
_getPageColor~scCs|jj||jt�S(N(RpR�R(R�Ra((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt	_getStyle�scCstj|tt�S(N(R<R�R(R�Ra((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_getMarkupClass�scCsdtttj�fS(Ns1<!--This document created by %s ver.%s on: %s-->
(t	__title__R^ttimetctime(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_getDocumentCreatedBy�scCs�|jjd�|jjd|j�|jj|j��|jjd�|jjd|j��|j�|jjd�dS(Ns3<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
s<html><head><title>%s</title>
sH<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
s</head><body bgcolor="%s">
s<pre>(RvR�R�RmRgR\(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_doHTMLStart�s		
c	Cs�|jj||jt�d \}}g}g}d|kr[|jd�|jd�nd|kr�|jd�|jd�nd|kr�|jd	�|jd
�n|j�dj|�}dj|�}|||fS(NiR\s<b>s</b>R]s<i>s</i>tus<u>s</u>RZ(RpR�RRtreverseR�(	R�RDREttagsRdR�R�R�R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_getHTMLStyles�s &



cCs�|j}|tkrd}nd}|j||�\}}}|j|j�r~|tkrr|j|j�}n|j|jd�}g}	|	j|jd��|jt|�\}
}}t	|�}
x�|D]�}|j
�}|r|j�}d|||f}n|}|
dkr-d\}}ndj|d|d|
||d	|g	�}|	j||�q�Wdj|	�}n|d
kr�d||f}d	}nd
\}}|tkr�|j
jdj|||||g��n|j
j|�dS(Ns% style="border: solid 1.5pt #FF0000;"RZRis<a name="%s" href="#%s">%s</a>is<font color=R�s</font>s#000000s<font color="%s"%s>(RZRZ(RZRZ(RRRrR�RRR�RtpopR�R`tstripR�RvR�(R�RDRERtstyletstarttagtendtagRdt	splittexttstoret	lstarttagtlendtagtlcolorR�R�R_tnumstripRZt
linenumbert	startfonttendfont((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt
_sendHTMLText�sF		
	cCsb|jdkr)|jjd|j�n5|jt�}|jjd||jtj�f�dS(NRZs%s
sM<b><font color="%s"># %s                             <br># %s</font></b><hr>
(RrRvR�ReRR�RkRl(R�Rd((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt
_doHTMLHeader�s	cCsb|jdkr)|jjd|j�n5|jt�}|jjd||jtj�f�dS(NRZs%s
sM<b><font color="%s">                             <hr># %s<br># %s</font></b>
(RsRvR�ReRR�RkRl(R�Rd((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt
_doHTMLFooter�s	cCs.|jjd�|j�|jjd�dS(Ns</pre>
s</body></html>
(RvR�R](R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt
_doHTMLEnds
c
CsX|j|�\}}}g}d}d}|j�}|r�d|kr�|jd�}|d}	|||	!}|j|dd�nd|kr�|jd�n
|jd�d|kr�|jd	�nd
|kr�|jd�nd|kr�d
}
n0d|krd}
nd|kr$d}
nd}
d|kr?d}n�d|krTd}n~d|krid}nid|kr~d}nTd|kr�d}n?d|kr�d}n*d|kr�d}nd |kr�d!}nd"}x3d#d$d%d&gD]}||kr�|d7}q�q�W|d"kr:|r:|jd'||
f�q�|dkrOd!}nd&|kru|jd(||
f�nd#|kr�|jd)||
f�nd$|kr�|jd*||
f�nd%|kr�|jd+||
f�q�n
|jd�|r|jd,|�n|jd-|�|r<|jd.|�n|j|�d/j|�fS(0NRciRZiR\sfont-weight:bold;sfont-weight:normal;R]sfont-style:italic;Rostext-decoration:underline;RtthicktmtmediumtttthintntinsetR�toutsetR�tridgetgtgrooveR)tdoubleRktdottedRmtdashedtstsolidiR�R�t^tvsborder: %s %s;sborder-bottom:%s %s;sborder-left:%s %s;sborder-right:%s %s;sborder-top:%s %s;sborder-color:%s;s	color:%s;sbackground-color:%s;R(RhR|R�R�R�RRiR�(
R�RaRqt	forecolort	backcolorRutbordertbordercolorR�R�tsizetseperate_sidestside((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_getCSSStyles�


												
cCs�g}||j7}|s)|jd�n|jd|j��x(tD] }|jd|j|��qGW|j|jjtd��|j|jjtd��|js�|jd�ndj	|�S(s* create external and internal style sheetss<style type="text/css">
<!--
sbody { background:%s; }
s.%s { %s }
s.py { }
RZs--></style>
(
RfRRgR<R�RpR�R R"R�(R�RftstylesRa((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR�]s

	cCs�|jjd�|jjd|j�|jj|j��|jjd�|j�|jjd�|j�|jj|jjtd��dS(Ns3<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
s<html><head><title>%s</title>
sH<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
s</head>
<body>
s<pre class="py">
(	RvR�R�Rmt_doCSSStyleSheetR\RpR�R(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_doCSSStartvs	

cCs6|js"|jj|j��n|jjd�dS(Ns:<link rel="stylesheet" href="pystyle.css" type="text/css">(RfRvR�R�(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR��s
		cCstj|tt�}||jkrE|tkrE|jjd�dS|j|j�rStjttt�}d|}|tkr�|j	|j�}n|j	|jd�}g}|j
|jd��xt|D]l}|j�}	|j
r|	j�}
d|
|
|	f}n|	}dj||dg�}|j
||�q�Wdj|�}n|j|j�r_g}|j	|jd�}
|
jd�}|jd�}|d	kr�|| d
||}n|j
|�xy|
D]q}|jr|jdd|�}nd||f}|jd�}|d	kr<|| d
}n|j
|�q�Wdj|�}n|tkr�|tkr�|jdkr�d|}d}n:|tkr�|jdkr�d\}}nd|}d}|jjdj|||g��n|jj|�dS(Ns<span class="py_line">s<span class="%s">Ris<a name="%s" href="#%s">%s</a>RZs</span>s
i����s</span></span>s</span><span class="%s">s<span class="%s">%ss</span></span>
R4s<div class="%s">s</div>R5(RZRZ(R<R�RRRRvR�R�RR�RRsR`RRtR�trfindR	R�RRB(R�RDREtmarkupclasst	newmarkupt
lstartspanRxRyR�R_R}RZR~tpartstfirstRt	startspantendspan((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_sendCSSText�sf

	

		
	
%cCsb|jdkr)|jjd|j�n5tjt�}|jjd||jtj�f�dS(NRZs%s
s)<div class="%s"># %s <br> # %s</div><hr>
(	RrRvR�R<R�RR�RkRl(R�tname((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_doCSSHeader�s
	cCs\|jdkr)|jjd|j�n/|jjdtjt�|jtj�f�dS(NRZs%s
s)<hr><div class="%s"># %s <br> # %s</div>
(	RsRvR�R<R�RR�RkRl(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_doCSSFooter�s	cCs=|jj|jjtd��|j�|jjd�dS(Ns</pre>
s</body></html>
(RvR�RpR�RR](R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt	_doCSSEnd�s
cCs�|jjd�|jjd|j�|jj|j��|jjd�|j�|jjd�|j�|jj|jjtd��dS(Ns�<?xml version="1.0"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
s<head><title>%s</title>
sI<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
s</head>
<body>
s<pre class="py">
(	RvR�R�Rmt_doXHTMLStyleSheetR\RpR�R(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt
_doXHTMLStart�s		

cCs6|js"|jj|j��n|jjd�dS(Ns<<link rel="stylesheet" href="pystyle.css" type="text/css"/>
(RfRvR�R�(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR�
s
		cCs|j||�dS(N(R�(R�RDRE((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_sendXHTMLTextscCs\|jr#|jjd|j�n5tjt�}|jjd||jtj�f�dS(Ns%s
s,<div class="%s"># %s <br/> # %s</div><hr/>
 (	RrRvR�R<R�RR�RkRl(R�R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_doXHTMLHeaders		cCsV|jr#|jjd|j�n/|jjdtjt�|jtj�f�dS(Ns%s
s+<hr/><div class="%s"># %s <br/> # %s</div>
(	RsRvR�R<R�RR�RkRl(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_doXHTMLFooter$s		cCs|j�dS(N(R�(R�((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt_doXHTMLEnd,s(,R�R�t__doc__R|R_RoR�R�RVRRR[RR\R]RR`RbReRfRgRhRiRmRnRrR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyR/�sR#H	�			
													
		<	
	
			R		
	Q			
		
		
	t__main__(]R�t__all__RjR^t__date__t
__author__t__credits__R}R_RkR�RyR?R6RR�t	cStringIOR�RRRR>RRt	NT_OFFSETRR
RRR
RRRRRRRRRRRRRRRRR	RRR RRR"RR<R!R#R$R&R'R%R)R(R*R8R+R,R�R|R-R.R1R2R3R0R5R6R4R�R;R:R7R9R�R�R�R�R�R�R�tobjectR/R�(((sI/opt/alt/python27/lib/python2.7/site-packages/paste/util/PySourceColor.pyt<module>s<�							






































	l	t^	
		
						)(					
	���r

Zerion Mini Shell 1.0