Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 19bd24a6b0a164b1076d611371f5d099 > files > 146

epydoc-3.0.1-7mdv2010.2.noarch.rpm

<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>epydoc.markup.doctest.XMLDoctestColorizer</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="epydoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 3.0.1</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="epydoc-module.html">Package&nbsp;epydoc</a> ::
        <a href="epydoc.markup-module.html">Package&nbsp;markup</a> ::
        <a href="epydoc.markup.doctest-module.html">Module&nbsp;doctest</a> ::
        Class&nbsp;XMLDoctestColorizer
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="epydoc.markup.doctest.XMLDoctestColorizer-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class XMLDoctestColorizer</h1><p class="nomargin-top"><span class="codelink"><a href="epydoc.markup.doctest-pysrc.html#XMLDoctestColorizer">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_epydoc_m_8" name="uml_class_diagram_for_epydoc_m_8">
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#PROMPT_RE" title="A regexp that matches Python prompts" alt="" coords="17,28,300,47" />
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#PROMPT2_RE" title="A regexp that matches Python &quot;...&quot; prompts." alt="" coords="17,47,300,65" />
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#EXCEPT_RE" title="A regexp that matches doctest exception blocks." alt="" coords="17,65,300,84" />
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#DOCTEST_DIRECTIVE_RE" title="A regexp that matches doctest directives." alt="" coords="17,84,300,103" />
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#DOCTEST_RE" title="A regexp that matches all of the regions of a doctest block that should be  colored." alt="" coords="17,103,300,121" />
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#DOCTEST_EXAMPLE_RE" title="This regular expression is used to find doctest examples in a string." alt="" coords="17,121,300,140" />
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#colorize_inline" title="Colorize a string containing Python code." alt="" coords="17,143,300,161" />
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#colorize_codeblock" title="Colorize a string containing only Python code." alt="" coords="17,161,300,180" />
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#colorize_doctest" title="Colorize a string containing one or more doctest examples." alt="" coords="17,180,300,199" />
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#subfunc" title="epydoc.markup.doctest.DoctestColorizer.subfunc" alt="" coords="17,199,300,217" />
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html" title="An abstract base class for performing syntax highlighting on doctest blocks and other bits of Python code." alt="" coords="5,5,312,224" />
<area shape="rect" href="epydoc.markup.doctest.XMLDoctestColorizer&#45;class.html#PREFIX" title="A string that is added to the beginning of the strings returned by  colorize_codeblock and colorize_doctest." alt="" coords="95,265,223,284" />
<area shape="rect" href="epydoc.markup.doctest.XMLDoctestColorizer&#45;class.html#SUFFIX" title="A string that is added to the end of the strings returned by  colorize_codeblock and colorize_doctest." alt="" coords="95,284,223,303" />
<area shape="rect" href="epydoc.markup.doctest.XMLDoctestColorizer&#45;class.html#markup" title="Apply syntax highlighting to a single substring from a doctest block." alt="" coords="95,305,223,324" />
<area shape="rect" href="epydoc.markup.doctest.XMLDoctestColorizer&#45;class.html" title="A subclass of DoctestColorizer that generates XML&#45;like output." alt="" coords="83,243,235,331" />
</map>
  <img src="uml_class_diagram_for_epydoc_m_8.gif" alt='' usemap="#uml_class_diagram_for_epydoc_m_8" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<p>A subclass of DoctestColorizer that generates XML-like output. This 
  class is mainly intended to be used for testing purposes.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="epydoc.markup.doctest.XMLDoctestColorizer-class.html#markup" class="summary-sig-name">markup</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">s</span>,
        <span class="summary-sig-arg">tag</span>)</span><br />
      Apply syntax highlighting to a single substring from a doctest block.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="epydoc.markup.doctest-pysrc.html#XMLDoctestColorizer.markup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html">DoctestColorizer</a></code></b>:
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#colorize_codeblock">colorize_codeblock</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#colorize_doctest">colorize_doctest</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#colorize_inline">colorize_inline</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#subfunc">subfunc</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="PREFIX"></a><span class="summary-name">PREFIX</span> = <code title="'''&lt;colorized&gt;
'''"><code class="variable-quote">'</code><code class="variable-string">&lt;colorized&gt;\n</code><code class="variable-quote">'</code></code><br />
      A string that is added to the beginning of the strings returned by <a
      
      href="epydoc.markup.doctest.DoctestColorizer-class.html#colorize_codeblock"
      class="link">colorize_codeblock</a> and <a 
      href="epydoc.markup.doctest.DoctestColorizer-class.html#colorize_doctest"
      class="link">colorize_doctest</a>.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SUFFIX"></a><span class="summary-name">SUFFIX</span> = <code title="'''&lt;/colorized&gt;
'''"><code class="variable-quote">'</code><code class="variable-string">&lt;/colorized&gt;\n</code><code class="variable-quote">'</code></code><br />
      A string that is added to the end of the strings returned by <a 
      href="epydoc.markup.doctest.DoctestColorizer-class.html#colorize_codeblock"
      class="link">colorize_codeblock</a> and <a 
      href="epydoc.markup.doctest.DoctestColorizer-class.html#colorize_doctest"
      class="link">colorize_doctest</a>.
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html">DoctestColorizer</a></code></b>:
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#DOCTEST_DIRECTIVE_RE">DOCTEST_DIRECTIVE_RE</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#DOCTEST_EXAMPLE_RE">DOCTEST_EXAMPLE_RE</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#DOCTEST_RE">DOCTEST_RE</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#EXCEPT_RE">EXCEPT_RE</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#PROMPT2_RE">PROMPT2_RE</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#PROMPT_RE">PROMPT_RE</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html">DoctestColorizer</a></code></b> (private):
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#_BI" onclick="show_private();">_BI</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#_BUILTINS" onclick="show_private();">_BUILTINS</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#_BUILTIN_GRP" onclick="show_private();">_BUILTIN_GRP</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#_COMMENT_GRP" onclick="show_private();">_COMMENT_GRP</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#_DEFINE_GRP" onclick="show_private();">_DEFINE_GRP</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#_KEYWORDS" onclick="show_private();">_KEYWORDS</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#_KEYWORD_GRP" onclick="show_private();">_KEYWORD_GRP</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#_KW" onclick="show_private();">_KW</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#_PROMPT1_GRP" onclick="show_private();">_PROMPT1_GRP</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#_PROMPT2_GRP" onclick="show_private();">_PROMPT2_GRP</a></code>,
      <code><a href="epydoc.markup.doctest.DoctestColorizer-class.html#_STRING_GRP" onclick="show_private();">_STRING_GRP</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="markup"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">markup</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">s</span>,
        <span class="sig-arg">tag</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="epydoc.markup.doctest-pysrc.html#XMLDoctestColorizer.markup">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Apply syntax highlighting to a single substring from a doctest block.
  <code>s</code> is the substring, and <code>tag</code> is the tag that 
  should be applied to the substring.  <code>tag</code> will be one of the 
  following strings:</p>
  <ul>
    <li>
      <code>prompt</code> -- the Python PS1 prompt (&gt;&gt;&gt;)
    </li>
    <li>
      <code>more</code> -- the Python PS2 prompt (...)
    </li>
    <li>
      <code>keyword</code> -- a Python keyword (for, if, etc.)
    </li>
    <li>
      <code>builtin</code> -- a Python builtin name (abs, dir, etc.)
    </li>
    <li>
      <code>string</code> -- a string literal
    </li>
    <li>
      <code>comment</code> -- a comment
    </li>
    <li>
      <code>except</code> -- an exception traceback (up to the next 
      &gt;&gt;&gt;)
    </li>
    <li>
      <code>output</code> -- the output from a doctest block.
    </li>
    <li>
      <code>defname</code> -- the name of a function or class defined by a 
      <code>def</code> or <code>class</code> statement.
    </li>
    <li>
      <code>other</code> -- anything else (does *not* include output.)
    </li>
  </ul>
  <dl class="fields">
    <dt>Overrides:
        <a href="epydoc.markup.doctest.DoctestColorizer-class.html#markup">DoctestColorizer.markup</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="epydoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 3.0.1</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0.1 on Wed Jan 30 14:08:30 2008</a>
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>