Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
docutils
/
writers
/
odf_odt
/
File Content:
pygmentsformatter.pyc
� >��Xc @ sj d Z d d l Z d d l Z d e j j f d � � YZ d e f d � � YZ d e f d � � YZ d S( s. Additional support for Pygments formatter. i����Nt OdtPygmentsFormatterc B s e Z d � Z d d � Z RS( c C s) t j j j | � | | _ | | _ d S( N( t pygmentst formattert Formattert __init__t rststyle_functiont escape_function( t selfR R ( ( sL /tmp/pip-build-uEGWVr/docutils/docutils/writers/odf_odt/pygmentsformatter.pyR s c C s | j | | � S( N( R ( R t namet parameters( ( sL /tmp/pip-build-uEGWVr/docutils/docutils/writers/odf_odt/pygmentsformatter.pyt rststyle s ( ( t __name__t __module__R R ( ( ( sL /tmp/pip-build-uEGWVr/docutils/docutils/writers/odf_odt/pygmentsformatter.pyR s t OdtPygmentsProgFormatterc B s e Z d � Z RS( c C s t j j } x| D]\ } } | j | � } | | j k r_ | j d � } d | | f } n�| | j j k r� | j d � } d | | f } nw| | j j j | j j j j | j j j | j j j | j j j | j j f k r | j d � } d | | f } n| | j k r:| j d � } d | | f } n� | | j k rk| j d � } d | | f } n� | | j j k r�| j d � } d | | f } nk | | j j k r�| j d � } d | | f } n7 | | j k r| j d � } d | | f } n | } | j | � q Wd S( Ns codeblock-keywords. <text:span text:style-name="%s">%s</text:span>s codeblock-strings codeblock-numbers codeblock-operators codeblock-comments codeblock-classnames codeblock-functionnames codeblock-name( R t tokent TokenR t KeywordR t Literalt Stringt Numbert Integert Longt Floatt Hext Octt Operatort Commentt Namet Classt Functiont write( R t tokensourcet outfilet tokenclasst ttypet valuet s2t s1( ( sL /tmp/pip-build-uEGWVr/docutils/docutils/writers/odf_odt/pygmentsformatter.pyt format sV ( R R R&