Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bd9b8648918182c52f8a2d496fcd571e > files > 82

python-genshi-0.5.1-3mdv2010.0.i586.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>genshi.core</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="genshi-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="../index.html">Documentation Index</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="genshi-module.html">Package&nbsp;genshi</a> ::
        Module&nbsp;core
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module core</h1><p class="nomargin-top"></p>
Core classes for markup processing.

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Classes</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="genshi.core.Stream-class.html" class="summary-name">Stream</a><br />
      Represents a stream of markup events.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="genshi.core.Attrs-class.html" class="summary-name">Attrs</a><br />
      Immutable sequence type that stores the attributes of an element.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="genshi.core.Markup-class.html" class="summary-name">Markup</a><br />
      Marks a string as being safe for inclusion in HTML/XML output without
needing to be escaped.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="genshi.core.Namespace-class.html" class="summary-name">Namespace</a><br />
      Utility class creating and testing elements with a namespace.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="genshi.core.QName-class.html" class="summary-name">QName</a><br />
      A qualified element or attribute name.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Functions</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><a href="genshi.core.Markup-class.html" class="link">Markup</a></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="genshi.core-module.html#escape" class="summary-sig-name">escape</a>(<span class="summary-sig-arg">text</span>,
        <span class="summary-sig-arg">quotes</span>=<span class="summary-sig-default">True</span>)</span><br />
      Create a Markup instance from a string and escape special characters
it may contain (&lt;, &gt;, &amp; and &quot;).</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code class="link">unicode</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="genshi.core-module.html#unescape" class="summary-sig-name">unescape</a>(<span class="summary-sig-arg">text</span>)</span><br />
      Reverse-escapes &amp;, &lt;, &gt;, and &quot; and returns a <code class="link">unicode</code> object.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Function Details</span></td>
</tr>
</table>
<a name="escape"></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">escape</span>(<span class="sig-arg">text</span>,
        <span class="sig-arg">quotes</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Create a Markup instance from a string and escape special characters
it may contain (&lt;, &gt;, &amp; and &quot;).</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>escape(<span class="py-string">'&quot;1 &lt; 2&quot;'</span>)
<span class="py-output">&lt;Markup u'&amp;#34;1 &amp;lt; 2&amp;#34;'&gt;</span></pre>
<p>If the <code class="link">quotes</code> parameter is set to <code class="link">False</code>, the &quot; character is left
as is. Escaping quotes is generally only required for strings that are
to be used in attribute values.</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>escape(<span class="py-string">'&quot;1 &lt; 2&quot;'</span>, quotes=False)
<span class="py-output">&lt;Markup u'&quot;1 &amp;lt; 2&quot;'&gt;</span></pre>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>text</code></strong> - the text to escape</li>
        <li><strong class="pname"><code>quotes</code></strong> - if <tt class="rst-docutils literal"><span class="pre">True</span></tt>, double quote characters are escaped in
addition to the other special characters</li>
    </ul></dd>
    <dt>Returns: <a href="genshi.core.Markup-class.html" class="link">Markup</a></dt>
        <dd>the escaped <a href="genshi.core.Markup-class.html" class="link">Markup</a> string</dd>
  </dl>
</td></tr></table>
</div>
<a name="unescape"></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">unescape</span>(<span class="sig-arg">text</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Reverse-escapes &amp;, &lt;, &gt;, and &quot; and returns a <code class="link">unicode</code> object.</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>unescape(Markup(<span class="py-string">'1 &amp;lt; 2'</span>))
<span class="py-output">u'1 &lt; 2'</span></pre>
<p>If the provided <code class="link">text</code> object is not a <a href="genshi.core.Markup-class.html" class="link">Markup</a> instance, it is returned
unchanged.</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>unescape(<span class="py-string">'1 &amp;lt; 2'</span>)
<span class="py-output">'1 &amp;lt; 2'</span></pre>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>text</code></strong> - the text to unescape</li>
    </ul></dd>
    <dt>Returns: <code class="link">unicode</code></dt>
        <dd>the unescsaped string</dd>
  </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="genshi-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="../index.html">Documentation Index</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Jul  9 18:16:20 2008
    </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>