Commits

Anonymous committed e5224c5

release 0.4.0

Comments (0)

Files changed (22)

+Version 0.4.0 (2008/11/26)
+--------------------------
+    * fixed bug #0005: percent_translated divide by 0 on empty po files,
+    * fixed bug #0004: occurences that have hiphens are wrapped when they
+      should not,
+    * changes in how encoding is handled,
+    * remove deprecation warnings for typo "occurences",
+    * added POEntry.__cmp__() method to sort entries like gettext does,
+    * fixed POEntry.transalated(),
+    * added a merge() method to POFile class, that behaves like the gettext
+      msgmerge utility,
+    * obsolete entries are now written at the end of the file and with only
+      msgid/msgstr like gettext does,
+    * fixed some bugs in mo files parsing,
+    * renamed quote/unquote functions to escape/unescape,
+    * various cosmetic changes.
+
 Version 0.3.1 (2007/12/13)
 --------------------------
     * fixed bug #0002: typo: "occurences" instead of "occurrences",

docs/api/api-objects.txt

 polib	polib-module.html
-polib.unquote	polib-module.html#unquote
 polib._strsplit	polib-module.html#_strsplit
 polib.default_encoding	polib-module.html#default_encoding
 polib._listpop	polib-module.html#_listpop
+polib.escape	polib-module.html#escape
+polib.pofile	polib-module.html#pofile
 polib._listappend	polib-module.html#_listappend
 polib._dictget	polib-module.html#_dictget
 polib._strstrip	polib-module.html#_strstrip
-polib.quote	polib-module.html#quote
 polib._strjoin	polib-module.html#_strjoin
 polib._strreplace	polib-module.html#_strreplace
-polib.pofile	polib-module.html#pofile
+polib.unescape	polib-module.html#unescape
 polib.detect_encoding	polib-module.html#detect_encoding
 polib.mofile	polib-module.html#mofile
 polib.MOEntry	polib.MOEntry-class.html
 polib._BaseFile.__repr__	polib._BaseFile-class.html#__repr__
 polib._MOFileParser	polib._MOFileParser-class.html
 polib._MOFileParser._readbinary	polib._MOFileParser-class.html#_readbinary
+polib._MOFileParser.LITTLE_ENDIAN	polib._MOFileParser-class.html#LITTLE_ENDIAN
 polib._MOFileParser.parse	polib._MOFileParser-class.html#parse
 polib._MOFileParser.parse_magicnumber	polib._MOFileParser-class.html#parse_magicnumber
+polib._MOFileParser.BIG_ENDIAN	polib._MOFileParser-class.html#BIG_ENDIAN
 polib._MOFileParser.__init__	polib._MOFileParser-class.html#__init__
 polib._POFileParser	polib._POFileParser-class.html
 polib._POFileParser.handle_he	polib._POFileParser-class.html#handle_he

docs/api/class-tree.html

     <li> <strong class="uidlink">object</strong>:
       <em class="summary">The most base type</em>
     <ul>
-    <li> <strong class="uidlink"><a href="polib._POFileParser-class.html">polib._POFileParser</a></strong>:
-      <em class="summary">A finite state machine to parse efficiently and correctly po
-file format.</em>
-    </li>
-    <li> <strong class="uidlink"><a href="polib._MOFileParser-class.html">polib._MOFileParser</a></strong>:
-      <em class="summary">A class to parse binary mo files.</em>
-    </li>
-    <li> <strong class="uidlink"><a href="polib._BaseEntry-class.html">polib._BaseEntry</a></strong>:
+    <li> <strong class="uidlink"><a href="polib._BaseEntry-class.html" onclick="show_private();">polib._BaseEntry</a></strong>:
       <em class="summary">Base class for POEntry or MOEntry objects.</em>
     <ul>
+    <li> <strong class="uidlink"><a href="polib.MOEntry-class.html">polib.MOEntry</a></strong>:
+      <em class="summary">Represents a mo file entry.</em>
+    </li>
     <li> <strong class="uidlink"><a href="polib.POEntry-class.html">polib.POEntry</a></strong>:
       <em class="summary">Represents a po file entry.</em>
     </li>
-    <li> <strong class="uidlink"><a href="polib.MOEntry-class.html">polib.MOEntry</a></strong>:
-      <em class="summary">Represents a mo file entry.</em>
-    </li>
     </ul>
     </li>
+    <li> <strong class="uidlink"><a href="polib._MOFileParser-class.html" onclick="show_private();">polib._MOFileParser</a></strong>:
+      <em class="summary">A class to parse binary mo files.</em>
+    </li>
+    <li> <strong class="uidlink"><a href="polib._POFileParser-class.html" onclick="show_private();">polib._POFileParser</a></strong>:
+      <em class="summary">A finite state machine to parse efficiently and correctly po file 
+        format.</em>
+    </li>
     <li> <strong class="uidlink">list</strong>:
-      <em class="summary">list() -&gt; new list
-list(sequence) -&gt; new list initialized from sequence's items</em>
+      <em class="summary">list() -&gt; new list list(sequence) -&gt; new list initialized 
+        from sequence's items</em>
     <ul>
-    <li> <strong class="uidlink"><a href="polib._BaseFile-class.html">polib._BaseFile</a></strong>:
+    <li> <strong class="uidlink"><a href="polib._BaseFile-class.html" onclick="show_private();">polib._BaseFile</a></strong>:
       <em class="summary">Common parent class for POFile and MOFile classes.</em>
     <ul>
+    <li> <strong class="uidlink"><a href="polib.MOFile-class.html">polib.MOFile</a></strong>:
+      <em class="summary">Mo file reader/writer.</em>
+    </li>
     <li> <strong class="uidlink"><a href="polib.POFile-class.html">polib.POFile</a></strong>:
       <em class="summary">Po (or Pot) file reader/writer.</em>
     </li>
-    <li> <strong class="uidlink"><a href="polib.MOFile-class.html">polib.MOFile</a></strong>:
-      <em class="summary">Mo file reader/writer.</em>
-    </li>
     </ul>
     </li>
     </ul>
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0beta1 on Fri Dec 21 11:05:36 2007
+    Generated by Epydoc 3.0.1 on Wed Nov 26 19:13:55 2008
     </td>
     <td align="right" class="footer">
-      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
     </td>
   </tr>
 </table>
   // 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()
+  checkCookie();
   // -->
 </script>
-  
 </body>
 </html>

docs/api/epydoc.css

  *     defined below).
  */
 body                        { background: #ffffff; color: #000000; }
+p                           { margin-top: 0.5em; margin-bottom: 0.5em; }
 a:link                      { color: #0000ff; }
 a:visited                   { color: #204080; }
 dt                          { font-weight: bold; }
 h3                          { font-size: +110%; font-style: italic;
                               font-weight: normal; }
 code                        { font-size: 100%; }
+/* N.B.: class, not pseudoclass */
+a.link                      { font-family: monospace; }
  
 /* Page Header & Footer
  *   - The standard page header consists of a navigation bar (with
  */ 
 h1.epydoc                   { margin: 0; font-size: +140%; font-weight: bold; }
 h2.epydoc                   { font-size: +130%; font-weight: bold; }
-h3.epydoc                   { font-size: +115%; font-weight: bold; }
+h3.epydoc                   { font-size: +115%; font-weight: bold;
+                              margin-top: 0.2em; }
 td h3.epydoc                { font-size: +115%; font-weight: bold;
                               margin-bottom: 0; }
 table.navbar                { background: #a0c0ff; color: #000000;
 dl.fields                   { margin-left: 2em; margin-top: 1em;
                               margin-bottom: 1em; }
 dl.fields dd ul             { margin-left: 0em; padding-left: 0em; }
+dl.fields dd ul li ul       { margin-left: 2em; padding-left: 0em; }
 div.fields                  { margin-left: 2em; }
 div.fields p                { margin-bottom: 0.5em; }
 
 .summary-sig-arg            { color: #006040; }
 .summary-sig-default        { color: #501800; }
 
+/* Subclass list
+ */
+ul.subclass-list { display: inline; }
+ul.subclass-list li { display: inline; }
+
 /* To render variables, classes etc. like functions */
 table.summary .summary-name { color: #006080; font-weight: bold;
                               font-family: monospace; }

docs/api/epydoc.js

           if (elts[i].className == "private") {
             elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
           }
+          else if (elts[i].className == "public") {
+            elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"block":"none");
+          }
         }
-        // Update all table rowss containing private objects.  Note, we
+        // Update all table rows containing private objects.  Note, we
         // use "" instead of "block" becaue IE & firefox disagree on what
         // this should be (block vs table-row), and "" just gives the
         // default for both browsers.
         for(var i=0; i<elts.length; i++) {
           if (elts[i].className == "private") {
             elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?
-                                        "none":"list-item");
+                                        "none":"");
           }
         }
         // Update all list items containing private objects.
         // Set a cookie to remember the current option.
         document.cookie = "EpydocPrivate="+cmd;
       }
+function show_private() {
+        var elts = document.getElementsByTagName("a");
+        for(var i=0; i<elts.length; i++) {
+          if (elts[i].className == "privatelink") {
+            cmd = elts[i].innerHTML;
+            if (cmd && cmd.substr(0,4)=="show")
+                toggle_private();
+          }
+        }
+      }
 function getCookie(name) {
         var dc = document.cookie;
         var prefix = name + "=";
   var elt = document.getElementById(id+"-expanded-linenums");
   if (elt) elt.style.display = "none";
   var elt = document.getElementById(id+"-collapsed-linenums");
-  if (elt) { elt.innerHTML = "<br/>"; elt.style.display="block"; }
+  if (elt) { elt.innerHTML = "<br />"; elt.style.display="block"; }
   var elt = document.getElementById(id+"-toggle");
   if (elt) { elt.innerHTML = "+"; }
   var elt = document.getElementById(id+"-collapsed");

docs/api/help.html

 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0beta1 on Fri Dec 21 11:05:36 2007
+    Generated by Epydoc 3.0.1 on Wed Nov 26 19:13:55 2008
     </td>
     <td align="right" class="footer">
-      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
     </td>
   </tr>
 </table>
   // 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()
+  checkCookie();
   // -->
 </script>
-  
 </body>
 </html>

docs/api/identifier-index.html

 </td><td>
 [
  <a href="#A">A</a>
-  B
+ <a href="#B">B</a>
   C
  <a href="#D">D</a>
-  E
+ <a href="#E">E</a>
  <a href="#F">F</a>
   G
  <a href="#H">H</a>
   I
   J
   K
-  L
+ <a href="#L">L</a>
  <a href="#M">M</a>
   N
  <a href="#O">O</a>
  <a href="#P">P</a>
- <a href="#Q">Q</a>
+  Q
   R
  <a href="#S">S</a>
  <a href="#T">T</a>
  <a href="#_">_</a>
 ]
 </td></table>
-<table border="0" width="100%"><tr valign="top">
-<td valign="top" width="1%"><a name="A"><h2 class="epydoc">A</h2></a></td>
+<table border="0" width="100%">
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="A">A</a></h2></td>
 <td valign="top">
 <table class="link-index" width="100%" border="1">
 <tr>
 <td width="33%" class="link-index"><a href="polib._POFileParser-class.html#add">add()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
 <tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
 </table>
 </td></tr>
-<td valign="top" width="1%"><a name="D"><h2 class="epydoc">D</h2></a></td>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="B">B</a></h2></td>
 <td valign="top">
 <table class="link-index" width="100%" border="1">
 <tr>
-<td width="33%" class="link-index"><a href="polib-module.html#default_encoding">default_encoding</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib-module.html#detect_encoding">detect_encoding()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
+<td width="33%" class="link-index"><a href="polib._MOFileParser-class.html#BIG_ENDIAN">BIG_ENDIAN</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html" onclick="show_private();">_MOFileParser</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
 <tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
 </table>
 </td></tr>
-<td valign="top" width="1%"><a name="F"><h2 class="epydoc">F</h2></a></td>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="D">D</a></h2></td>
 <td valign="top">
 <table class="link-index" width="100%" border="1">
 <tr>
-<td width="33%" class="link-index"><a href="polib._BaseFile-class.html#find">find()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html">_BaseFile</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib.MOFile-class.html#fuzzy_entries">fuzzy_entries()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib.POFile-class.html#fuzzy_entries">fuzzy_entries()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</font></td>
-</tr>
-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
-</table>
-</td></tr>
-<td valign="top" width="1%"><a name="H"><h2 class="epydoc">H</h2></a></td>
-<td valign="top">
-<table class="link-index" width="100%" border="1">
-<tr>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_fl">handle_fl()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_mi">handle_mi()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_oc">handle_oc()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-</tr>
-<tr>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_gc">handle_gc()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_mp">handle_mp()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_tc">handle_tc()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-</tr>
-<tr>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_he">handle_he()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_ms">handle_ms()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-<td width="33%" class="link-index">&nbsp;</td>
-</tr>
-<tr>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_mc">handle_mc()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_mx">handle_mx()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-<td width="33%" class="link-index">&nbsp;</td>
-</tr>
-</table>
-</td></tr>
-<td valign="top" width="1%"><a name="M"><h2 class="epydoc">M</h2></a></td>
-<td valign="top">
-<table class="link-index" width="100%" border="1">
-<tr>
-<td width="33%" class="link-index"><a href="polib.POFile-class.html#merge">merge()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib.MOEntry-class.html">MOEntry</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib-module.html#mofile">mofile()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
-</tr>
-<tr>
-<td width="33%" class="link-index"><a href="polib._BaseFile-class.html#metadata_as_entry">metadata_as_entry()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html">_BaseFile</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib.MOFile-class.html">MOFile</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
-<td width="33%" class="link-index">&nbsp;</td>
-</tr>
-</table>
-</td></tr>
-<td valign="top" width="1%"><a name="O"><h2 class="epydoc">O</h2></a></td>
-<td valign="top">
-<table class="link-index" width="100%" border="1">
-<tr>
-<td width="33%" class="link-index"><a href="polib.MOFile-class.html#obsolete_entries">obsolete_entries()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib.POFile-class.html#obsolete_entries">obsolete_entries()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib._BaseFile-class.html#ordered_metadata">ordered_metadata()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html">_BaseFile</a>)</font></td>
-</tr>
-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
-</table>
-</td></tr>
-<td valign="top" width="1%"><a name="P"><h2 class="epydoc">P</h2></a></td>
-<td valign="top">
-<table class="link-index" width="100%" border="1">
-<tr>
-<td width="33%" class="link-index"><a href="polib._MOFileParser-class.html#parse">parse()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html">_MOFileParser</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib.POFile-class.html#percent_translated">percent_translated()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib-module.html">polib</a></td>
-</tr>
-<tr>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#parse">parse()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib.POEntry-class.html">POEntry</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#process">process()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
-</tr>
-<tr>
-<td width="33%" class="link-index"><a href="polib._MOFileParser-class.html#parse_magicnumber">parse_magicnumber()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html">_MOFileParser</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib.POFile-class.html">POFile</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
-<td width="33%" class="link-index">&nbsp;</td>
-</tr>
-<tr>
-<td width="33%" class="link-index"><a href="polib.MOFile-class.html#percent_translated">percent_translated()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</font></td>
-<td width="33%" class="link-index"><a href="polib-module.html#pofile">pofile()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
-<td width="33%" class="link-index">&nbsp;</td>
-</tr>
-</table>
-</td></tr>
-<td valign="top" width="1%"><a name="Q"><h2 class="epydoc">Q</h2></a></td>
-<td valign="top">
-<table class="link-index" width="100%" border="1">
-<tr>
-<td width="33%" class="link-index"><a href="polib-module.html#quote">quote()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
-<td width="33%" class="link-index">&nbsp;</td>
+<td width="33%" class="link-index"><a href="polib-module.html#default_encoding">default_encoding</a><br />
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib-module.html#detect_encoding">detect_encoding()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
 <tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
 </table>
 </td></tr>
-<td valign="top" width="1%"><a name="S"><h2 class="epydoc">S</h2></a></td>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="E">E</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="polib-module.html#escape">escape()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="F">F</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="polib._BaseFile-class.html#find">find()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib.MOFile-class.html#fuzzy_entries">fuzzy_entries()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib.POFile-class.html#fuzzy_entries">fuzzy_entries()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</span></td>
+</tr>
+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="H">H</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_fl">handle_fl()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_mi">handle_mi()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_oc">handle_oc()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_gc">handle_gc()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_mp">handle_mp()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_tc">handle_tc()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_he">handle_he()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_ms">handle_ms()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_mc">handle_mc()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#handle_mx">handle_mx()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="L">L</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="polib._MOFileParser-class.html#LITTLE_ENDIAN">LITTLE_ENDIAN</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html" onclick="show_private();">_MOFileParser</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="M">M</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="polib.POFile-class.html#merge">merge()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib.MOEntry-class.html">MOEntry</a><br />
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib-module.html#mofile">mofile()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="polib._BaseFile-class.html#metadata_as_entry">metadata_as_entry()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib.MOFile-class.html">MOFile</a><br />
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="O">O</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="polib.MOFile-class.html#obsolete_entries">obsolete_entries()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib.POFile-class.html#obsolete_entries">obsolete_entries()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib._BaseFile-class.html#ordered_metadata">ordered_metadata()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
+</tr>
+<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="P">P</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="polib._MOFileParser-class.html#parse">parse()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html" onclick="show_private();">_MOFileParser</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib.POFile-class.html#percent_translated">percent_translated()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib-module.html">polib</a></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#parse">parse()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib.POEntry-class.html">POEntry</a><br />
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib._POFileParser-class.html#process">process()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="polib._MOFileParser-class.html#parse_magicnumber">parse_magicnumber()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html" onclick="show_private();">_MOFileParser</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib.POFile-class.html">POFile</a><br />
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="polib.MOFile-class.html#percent_translated">percent_translated()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib-module.html#pofile">pofile()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
+<td width="33%" class="link-index">&nbsp;</td>
+</tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="S">S</a></h2></td>
 <td valign="top">
 <table class="link-index" width="100%" border="1">
 <tr>
 <td width="33%" class="link-index"><a href="polib.MOFile-class.html#save">save()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib.POFile-class.html#save_as_mofile">save_as_mofile()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="polib._BaseFile-class.html#save">save()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html">_BaseFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib.MOFile-class.html#save_as_pofile">save_as_pofile()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
 </table>
 </td></tr>
-<td valign="top" width="1%"><a name="T"><h2 class="epydoc">T</h2></a></td>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="T">T</a></h2></td>
 <td valign="top">
 <table class="link-index" width="100%" border="1">
 <tr>
 <td width="33%" class="link-index"><a href="polib._BaseFile-class.html#to_binary">to_binary()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html">_BaseFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib.MOFile-class.html#translated_entries">translated_entries()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="polib.POEntry-class.html#translated">translated()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib.POFile-class.html#translated_entries">translated_entries()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</span></td>
 <td width="33%" class="link-index">&nbsp;</td>
 </tr>
 </table>
 </td></tr>
-<td valign="top" width="1%"><a name="U"><h2 class="epydoc">U</h2></a></td>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="U">U</a></h2></td>
 <td valign="top">
 <table class="link-index" width="100%" border="1">
 <tr>
-<td width="33%" class="link-index"><a href="polib-module.html#unquote">unquote()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
+<td width="33%" class="link-index"><a href="polib-module.html#unescape">unescape()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib.MOFile-class.html#untranslated_entries">untranslated_entries()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib.POFile-class.html#untranslated_entries">untranslated_entries()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</span></td>
 </tr>
 <tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
 </table>
 </td></tr>
-<td valign="top" width="1%"><a name="_"><h2 class="epydoc">_</h2></a></td>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="_">_</a></h2></td>
 <td valign="top">
 <table class="link-index" width="100%" border="1">
 <tr>
 <td width="33%" class="link-index"><a href="polib.POEntry-class.html#__cmp__">__cmp__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#__repr__">__repr__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html">_BaseEntry</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseEntry-class.html">_BaseEntry</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="polib.MOFile-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseFile-class.html#__repr__">__repr__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html">_BaseFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseFile-class.html">_BaseFile</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="polib.POEntry-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib.MOEntry-class.html#__str__">__str__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.MOEntry-class.html">MOEntry</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.MOEntry-class.html">MOEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#_decode">_decode()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html">_BaseEntry</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html">_BaseEntry</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib.POEntry-class.html#__str__">__str__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._MOFileParser-class.html">_MOFileParser</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="polib._BaseFile-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html">_BaseFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib.POFile-class.html#__str__">__str__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._POFileParser-class.html">_POFileParser</a><br />
-<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="polib._MOFileParser-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html">_MOFileParser</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html" onclick="show_private();">_MOFileParser</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#__str__">__str__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html">_BaseEntry</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._MOFileParser-class.html#_readbinary">_readbinary()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html">_MOFileParser</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html" onclick="show_private();">_MOFileParser</a>)</span></td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="polib._POFileParser-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html">_POFileParser</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseFile-class.html#__str__">__str__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html">_BaseFile</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#_str_field">_str_field()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html">_BaseEntry</a>)</font></td>
+<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
 </tr>
 </table>
 </td></tr>
 </table>
-</br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
+<br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
 <table class="navbar" border="0" width="100%" cellpadding="0"
        bgcolor="#a0c0ff" cellspacing="0">
   <tr valign="middle">
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0beta1 on Fri Dec 21 11:05:36 2007
+    Generated by Epydoc 3.0.1 on Wed Nov 26 19:13:55 2008
     </td>
     <td align="right" class="footer">
-      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
     </td>
   </tr>
 </table>
   // 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()
+  checkCookie();
   // -->
 </script>
-  
 </body>
 </html>

docs/api/module-tree.html

 </b></center><br />
 <h1 class="epydoc">Module Hierarchy</h1>
 <ul class="nomargin-top">
-    <li> <strong class="uidlink"><a href="polib-module.html">polib</a></strong>: <em class="summary"><strong>polib</strong> allows you to manipulate, create, modify gettext files (pot, po
-and mo files).</em>    </li>
+    <li> <strong class="uidlink"><a href="polib-module.html">polib</a></strong>: <em class="summary">**polib** allows you to manipulate, create, modify gettext files 
+        (pot, po and mo files).</em>    </li>
 </ul>
 <!-- ==================== NAVIGATION BAR ==================== -->
 <table class="navbar" border="0" width="100%" cellpadding="0"
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0beta1 on Fri Dec 21 11:05:36 2007
+    Generated by Epydoc 3.0.1 on Wed Nov 26 19:13:55 2008
     </td>
     <td align="right" class="footer">
-      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
     </td>
   </tr>
 </table>
   // 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()
+  checkCookie();
   // -->
 </script>
-  
 </body>
 </html>

docs/api/polib-module.html

   </tr>
 </table>
 <!-- ==================== MODULE DESCRIPTION ==================== -->
-<h1 class="epydoc">Module polib</h1><span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span><br /><br />
-<p><strong>polib</strong> allows you to manipulate, create, modify gettext files (pot, po
-and mo files).  You can load existing files, iterate through it's entries,
-add, modify entries, comments or metadata, etc... or create new po files
-from scratch.</p>
-<p><strong>polib</strong> provides a simple and pythonic API, exporting only three
-convenience functions (<em>pofile</em>, <em>mofile</em> and <em>detect_encoding</em>), and the
-four core classes, <em>POFile</em>, <em>MOFile</em>, <em>POEntry</em> and <em>MOEntry</em> for creating
-new files/entries.</p>
-<p><strong>Basic example</strong>:</p>
+<h1 class="epydoc">Module polib</h1><p class="nomargin-top"><span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span></p>
+<p>**polib** allows you to manipulate, create, modify gettext files (pot,
+  po and mo files).  You can load existing files, iterate through it's 
+  entries, add, modify entries, comments or metadata, etc... or create new 
+  po files from scratch.</p>
+  <p>**polib** provides a simple and pythonic API, exporting only three 
+  convenience functions (*pofile*, *mofile* and *detect_encoding*), and the
+  four core classes, *POFile*, *MOFile*, *POEntry* and *MOEntry* for 
+  creating new files/entries.</p>
+  <p>**Basic example**:</p>
 <pre class="py-doctest">
 <span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">import</span> polib
 <span class="py-prompt">&gt;&gt;&gt; </span><span class="py-comment"># load an existing po file</span>
 <span class="py-prompt">&gt;&gt;&gt; </span><span class="py-comment"># to save our modified po file:</span>
 <span class="py-prompt">&gt;&gt;&gt; </span><span class="py-comment"># po.save()</span>
 <span class="py-prompt">&gt;&gt;&gt; </span><span class="py-comment"># or you may want to compile the po file</span>
-<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-comment"># po.save_as_mofile('tests/test_utf8.mo')</span></pre><br /><br />
+<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-comment"># po.save_as_mofile('tests/test_utf8.mo')</span></pre>
 
 <hr />
 <div class="fields">      <p><strong>Version:</strong>
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type">&nbsp;</span>
     </td><td class="summary">
-        <a href="polib._BaseFile-class.html" class="summary-name">_BaseFile</a><br />
+        <a href="polib._BaseFile-class.html" class="summary-name" onclick="show_private();">_BaseFile</a><br />
       Common parent class for POFile and MOFile classes.
     </td>
   </tr>
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type">&nbsp;</span>
     </td><td class="summary">
-        <a href="polib._BaseEntry-class.html" class="summary-name">_BaseEntry</a><br />
+        <a href="polib._BaseEntry-class.html" class="summary-name" onclick="show_private();">_BaseEntry</a><br />
       Base class for POEntry or MOEntry objects.
     </td>
   </tr>
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type">&nbsp;</span>
     </td><td class="summary">
-        <a href="polib._POFileParser-class.html" class="summary-name">_POFileParser</a><br />
-      A finite state machine to parse efficiently and correctly po
-file format.
+        <a href="polib._POFileParser-class.html" class="summary-name" onclick="show_private();">_POFileParser</a><br />
+      A finite state machine to parse efficiently and correctly po file 
+        format.
     </td>
   </tr>
 <tr class="private">
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type">&nbsp;</span>
     </td><td class="summary">
-        <a href="polib._MOFileParser-class.html" class="summary-name">_MOFileParser</a><br />
+        <a href="polib._MOFileParser-class.html" class="summary-name" onclick="show_private();">_MOFileParser</a><br />
       A class to parse binary mo files.
     </td>
   </tr>
 </tr>
 <tr class="private">
     <td width="15%" align="right" valign="top" class="summary">
-      <span class="summary-type">&nbsp;</span>
+      <span class="summary-type">D[k] if k in D, else d</span>
     </td><td class="summary">
       <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
-          <td><span class="summary-sig"><a href="polib-module.html#_dictget" class="summary-sig-name">_dictget</a>(<span class="summary-sig-arg">D</span>,
+          <td><span class="summary-sig"><a name="_dictget"></a><span class="summary-sig-name">_dictget</span>(<span class="summary-sig-arg">D</span>,
         <span class="summary-sig-arg">k</span>,
         <span class="summary-sig-arg">d</span>=<span class="summary-sig-default">...</span>)</span><br />
       d defaults to None.</td>
   </tr>
 <tr class="private">
     <td width="15%" align="right" valign="top" class="summary">
-      <span class="summary-type">&nbsp;</span>
+      <span class="summary-type">item</span>
     </td><td class="summary">
       <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
-          <td><span class="summary-sig"><a href="polib-module.html#_listpop" class="summary-sig-name">_listpop</a>(<span class="summary-sig-arg">L</span>,
+          <td><span class="summary-sig"><a name="_listpop"></a><span class="summary-sig-name">_listpop</span>(<span class="summary-sig-arg">L</span>,
         <span class="summary-sig-arg">index</span>=<span class="summary-sig-default">...</span>)</span><br />
       remove and return item at index (default last)</td>
           <td align="right" valign="top">
   </tr>
 <tr class="private">
     <td width="15%" align="right" valign="top" class="summary">
-      <span class="summary-type">&nbsp;</span>
+      <span class="summary-type">string</span>
     </td><td class="summary">
       <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
-          <td><span class="summary-sig"><a href="polib-module.html#_strjoin" class="summary-sig-name">_strjoin</a>(<span class="summary-sig-arg">S</span>,
+          <td><span class="summary-sig"><a href="polib-module.html#_strjoin" class="summary-sig-name" onclick="show_private();">_strjoin</a>(<span class="summary-sig-arg">S</span>,
         <span class="summary-sig-arg">sequence</span>)</span><br />
-      Return a string which is the concatenation of the strings in the
-sequence.</td>
+      Return a string which is the concatenation of the strings in the 
+      sequence.</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr class="private">
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">list of strings</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="polib-module.html#_strsplit" class="summary-sig-name" onclick="show_private();">_strsplit</a>(<span class="summary-sig-arg">S</span>,
+        <span class="summary-sig-arg">sep</span>=<span class="summary-sig-default">... </span>,
+        <span class="summary-sig-arg">maxsplit</span>=<span class="summary-sig-default">...</span>)</span><br />
+      Return a list of the words in the string S, using sep as the 
+      delimiter string.</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr class="private">
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">string or unicode</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="polib-module.html#_strstrip" class="summary-sig-name" onclick="show_private();">_strstrip</a>(<span class="summary-sig-arg">S</span>,
+        <span class="summary-sig-arg">chars</span>=<span class="summary-sig-default">...</span>)</span><br />
+      Return a copy of the string S with leading and trailing whitespace 
+      removed.</td>
           <td align="right" valign="top">
             <span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span>
             
     </td><td class="summary">
       <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
-          <td><span class="summary-sig"><a href="polib-module.html#_strsplit" class="summary-sig-name">_strsplit</a>(<span class="summary-sig-arg">S</span>,
-        <span class="summary-sig-arg">sep</span>=<span class="summary-sig-default">... </span>,
-        <span class="summary-sig-arg">maxsplit</span>=<span class="summary-sig-default">...</span>)</span><br />
-      Return a list of the words in the string S, using sep as the
-delimiter string.</td>
-          <td align="right" valign="top">
-            <span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span>
-            
-          </td>
-        </tr>
-      </table>
-      
-    </td>
-  </tr>
-<tr class="private">
-    <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="polib-module.html#_strstrip" class="summary-sig-name">_strstrip</a>(<span class="summary-sig-arg">S</span>,
-        <span class="summary-sig-arg">chars</span>=<span class="summary-sig-default">...</span>)</span><br />
-      Return a copy of the string S with leading and trailing
-whitespace removed.</td>
-          <td align="right" valign="top">
-            <span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span>
-            
-          </td>
-        </tr>
-      </table>
-      
-    </td>
-  </tr>
-<tr class="private">
-    <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="polib-module.html#_strreplace" class="summary-sig-name">_strreplace</a>(<span class="summary-sig-arg">...</span>)</span><br />
+          <td><span class="summary-sig"><a href="polib-module.html#_strreplace" class="summary-sig-name" onclick="show_private();">_strreplace</a>(<span class="summary-sig-arg">...</span>)</span><br />
       S.replace (old, new[, count]) -&gt; string</td>
           <td align="right" valign="top">
             <span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span>
         <tr>
           <td><span class="summary-sig"><a href="polib-module.html#pofile" class="summary-sig-name">pofile</a>(<span class="summary-sig-arg">fpath</span>,
         <span class="summary-sig-arg">**kwargs</span>)</span><br />
-      Convenience function that parse the po/pot file <em>fpath</em> and return
-a POFile instance.</td>
+      Convenience function that parse the po/pot file *fpath* and return a 
+      POFile instance.</td>
           <td align="right" valign="top">
             <span class="codelink"><a href="polib-pysrc.html#pofile">source&nbsp;code</a></span>
             
         <tr>
           <td><span class="summary-sig"><a href="polib-module.html#mofile" class="summary-sig-name">mofile</a>(<span class="summary-sig-arg">fpath</span>,
         <span class="summary-sig-arg">**kwargs</span>)</span><br />
-      Convenience function that parse the mo file <em>fpath</em> and return
-a MOFile instance.</td>
+      Convenience function that parse the mo file *fpath* and return a 
+      MOFile instance.</td>
           <td align="right" valign="top">
             <span class="codelink"><a href="polib-pysrc.html#mofile">source&nbsp;code</a></span>
             
       <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
           <td><span class="summary-sig"><a href="polib-module.html#detect_encoding" class="summary-sig-name">detect_encoding</a>(<span class="summary-sig-arg">fpath</span>)</span><br />
-      Try to detect the encoding used by the file <em>fpath</em>.</td>
+      Try to detect the encoding used by the file *fpath*.</td>
           <td align="right" valign="top">
             <span class="codelink"><a href="polib-pysrc.html#detect_encoding">source&nbsp;code</a></span>
             
     </td><td class="summary">
       <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
-          <td><span class="summary-sig"><a href="polib-module.html#quote" class="summary-sig-name">quote</a>(<span class="summary-sig-arg">st</span>)</span><br />
-      Quote and return the given string <em>st</em>.</td>
+          <td><span class="summary-sig"><a href="polib-module.html#escape" class="summary-sig-name">escape</a>(<span class="summary-sig-arg">st</span>)</span><br />
+      Escape special chars and return the given string *st*.</td>
           <td align="right" valign="top">
-            <span class="codelink"><a href="polib-pysrc.html#quote">source&nbsp;code</a></span>
+            <span class="codelink"><a href="polib-pysrc.html#escape">source&nbsp;code</a></span>
             
           </td>
         </tr>
     </td><td class="summary">
       <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
-          <td><span class="summary-sig"><a href="polib-module.html#unquote" class="summary-sig-name">unquote</a>(<span class="summary-sig-arg">st</span>)</span><br />
-      Unquote and return the given string <em>st</em>.</td>
+          <td><span class="summary-sig"><a href="polib-module.html#unescape" class="summary-sig-name">unescape</a>(<span class="summary-sig-arg">st</span>)</span><br />
+      Unescape special chars and return the given string *st*.</td>
           <td align="right" valign="top">
-            <span class="codelink"><a href="polib-pysrc.html#unquote">source&nbsp;code</a></span>
+            <span class="codelink"><a href="polib-pysrc.html#unescape">source&nbsp;code</a></span>
             
           </td>
         </tr>
   </td>
 </tr>
 </table>
-<a name="_dictget"></a>
-<div class="private">
-<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">_dictget</span>(<span class="sig-arg">D</span>,
-        <span class="sig-arg">k</span>,
-        <span class="sig-arg">d</span>=<span class="sig-default">...</span>)</span>
-  </h3>
-  </td><td align="right" valign="top"
-    ><span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span>&nbsp;
-    </td>
-  </table>
-  
-  d defaults to None.
-  <dl class="fields">
-    <dt>Returns:</dt>
-        <dd><pre class="literalblock">
-D[k] if k in D, else d
-
-</pre></dd>
-  </dl>
-</td></tr></table>
-</div>
-<a name="_listpop"></a>
-<div class="private">
-<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">_listpop</span>(<span class="sig-arg">L</span>,
-        <span class="sig-arg">index</span>=<span class="sig-default">...</span>)</span>
-  </h3>
-  </td><td align="right" valign="top"
-    >&nbsp;
-    </td>
-  </table>
-  
-  remove and return item at index (default last)
-  <dl class="fields">
-    <dt>Returns:</dt>
-        <dd><pre class="literalblock">
-item
-
-</pre></dd>
-  </dl>
-</td></tr></table>
-</div>
 <a name="_strjoin"></a>
 <div class="private">
 <table class="details" border="1" cellpadding="3"
   </td><td align="right" valign="top"
     ><span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span>&nbsp;
     </td>
-  </table>
+  </tr></table>
   
-  Return a string which is the concatenation of the strings in the
-sequence.  The separator between elements is S.
+  <p>Return a string which is the concatenation of the strings in the 
+  sequence.  The separator between elements is S.</p>
   <dl class="fields">
-    <dt>Returns:</dt>
-        <dd><pre class="literalblock">
-string
-
-</pre></dd>
+    <dt>Returns: string</dt>
   </dl>
 </td></tr></table>
 </div>
   </td><td align="right" valign="top"
     ><span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span>&nbsp;
     </td>
-  </table>
+  </tr></table>
   
-  Return a list of the words in the string S, using sep as the
-delimiter string.  If maxsplit is given, at most maxsplit
-splits are done. If sep is not specified or is None, any
-whitespace string is a separator.
+  <p>Return a list of the words in the string S, using sep as the delimiter
+  string.  If maxsplit is given, at most maxsplit splits are done. If sep 
+  is not specified or is None, any whitespace string is a separator.</p>
   <dl class="fields">
-    <dt>Returns:</dt>
-        <dd><pre class="literalblock">
-list of strings
-
-</pre></dd>
+    <dt>Returns: list of strings</dt>
   </dl>
 </td></tr></table>
 </div>
   </td><td align="right" valign="top"
     ><span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span>&nbsp;
     </td>
-  </table>
+  </tr></table>
   
-  Return a copy of the string S with leading and trailing
-whitespace removed.
-If chars is given and not None, remove characters in chars instead.
-If chars is unicode, S will be converted to unicode before stripping
+  <p>Return a copy of the string S with leading and trailing whitespace 
+  removed. If chars is given and not None, remove characters in chars 
+  instead. If chars is unicode, S will be converted to unicode before 
+  stripping</p>
   <dl class="fields">
-    <dt>Returns:</dt>
-        <dd><pre class="literalblock">
-string or unicode
-
-</pre></dd>
+    <dt>Returns: string or unicode</dt>
   </dl>
 </td></tr></table>
 </div>
   </td><td align="right" valign="top"
     ><span class="codelink"><a href="polib-pysrc.html">source&nbsp;code</a></span>&nbsp;
     </td>
-  </table>
+  </tr></table>
   
   <p>S.replace (old, new[, count]) -&gt; string</p>
-<p>Return a copy of string S with all occurrences of substring
-old replaced by new.  If the optional argument count is
-given, only the first count occurrences are replaced.</p>
+  <p>Return a copy of string S with all occurrences of substring old 
+  replaced by new.  If the optional argument count is given, only the first
+  count occurrences are replaced.</p>
   <dl class="fields">
   </dl>
 </td></tr></table>
   </td><td align="right" valign="top"
     ><span class="codelink"><a href="polib-pysrc.html#pofile">source&nbsp;code</a></span>&nbsp;
     </td>
-  </table>
+  </tr></table>
   
-  <p>Convenience function that parse the po/pot file <em>fpath</em> and return
-a POFile instance.</p>
-<dl class="rst-docutils">
-<dt><strong>Keyword arguments</strong>:</dt>
-<dd><ul class="rst-first rst-last rst-simple">
-<li><em>fpath</em>: string, full or relative path to the po/pot file to parse</li>
-<li><em>wrapwidth</em>: integer, the wrap width, only useful when -w option was
-passed to xgettext (optional, default to 78)</li>
-<li><em>autodetect_encoding</em>: boolean, if set to False the function will
-not try to detect the po file encoding (optional, default to True)</li>
-<li><em>encoding</em>: string, an encoding, only relevant if autodetect_encoding
-is set to False</li>
-</ul>
-</dd>
-</dl>
-<p><strong>Example</strong>:</p>
+  <p>Convenience function that parse the po/pot file *fpath* and return a 
+  POFile instance.</p>
+  <p>**Keyword arguments**:</p>
+  <ul>
+    <li>
+      *fpath*: string, full or relative path to the po/pot file to parse
+    </li>
+    <li>
+      *wrapwidth*: integer, the wrap width, only useful when -w option was 
+      passed to xgettext (optional, default to 78)
+    </li>
+    <li>
+      *autodetect_encoding*: boolean, if set to False the function will not
+      try to detect the po file encoding (optional, default to True)
+    </li>
+    <li>
+      *encoding*: string, an encoding, only relevant if autodetect_encoding
+      is set to False
+    </li>
+  </ul>
+  <p>**Example**:</p>
 <pre class="py-doctest">
 <span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">import</span> polib
 <span class="py-prompt">&gt;&gt;&gt; </span>po = polib.pofile(<span class="py-string">'tests/test_utf8.po'</span>)
   </td><td align="right" valign="top"
     ><span class="codelink"><a href="polib-pysrc.html#mofile">source&nbsp;code</a></span>&nbsp;
     </td>
-  </table>
+  </tr></table>
   
-  <p>Convenience function that parse the mo file <em>fpath</em> and return
-a MOFile instance.</p>
-<dl class="rst-docutils">
-<dt><strong>Keyword arguments</strong>:</dt>
-<dd><ul class="rst-first rst-last rst-simple">
-<li><em>fpath</em>: string, full or relative path to the mo file to parse</li>
-<li><em>wrapwidth</em>: integer, the wrap width, only useful when -w option was
-passed to xgettext to generate the po file that was used to format
-the mo file (optional, default to 78)</li>
-<li><em>autodetect_encoding</em>: boolean, if set to False the function will
-not try to detect the po file encoding (optional, default to True)</li>
-<li><em>encoding</em>: string, an encoding, only relevant if autodetect_encoding
-is set to False</li>
-</ul>
-</dd>
-</dl>
-<p><strong>Example</strong>:</p>
+  <p>Convenience function that parse the mo file *fpath* and return a 
+  MOFile instance.</p>
+  <p>**Keyword arguments**:</p>
+  <ul>
+    <li>
+      *fpath*: string, full or relative path to the mo file to parse
+    </li>
+    <li>
+      *wrapwidth*: integer, the wrap width, only useful when -w option was 
+      passed to xgettext to generate the po file that was used to format 
+      the mo file (optional, default to 78)
+    </li>
+    <li>
+      *autodetect_encoding*: boolean, if set to False the function will not
+      try to detect the po file encoding (optional, default to True)
+    </li>
+    <li>
+      *encoding*: string, an encoding, only relevant if autodetect_encoding
+      is set to False
+    </li>
+  </ul>
+  <p>**Example**:</p>
 <pre class="py-doctest">
 <span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">import</span> polib
 <span class="py-prompt">&gt;&gt;&gt; </span>mo = polib.mofile(<span class="py-string">'tests/test_utf8.mo'</span>)
   </td><td align="right" valign="top"
     ><span class="codelink"><a href="polib-pysrc.html#detect_encoding">source&nbsp;code</a></span>&nbsp;
     </td>
-  </table>
+  </tr></table>
   
-  <p>Try to detect the encoding used by the file <em>fpath</em>. The function will
-return polib default <em>encoding</em> if it's unable to detect it.</p>
-<dl class="rst-docutils">
-<dt><strong>Keyword argument</strong>:</dt>
-<dd><ul class="rst-first rst-last rst-simple">
-<li><em>fpath</em>: string, full or relative path to the mo file to parse.</li>
-</ul>
-</dd>
-</dl>
-<p><strong>Examples</strong>:</p>
+  <p>Try to detect the encoding used by the file *fpath*. The function will
+  return polib default *encoding* if it's unable to detect it.</p>
+  <p>**Keyword argument**:</p>
+  <ul>
+    <li>
+      *fpath*: string, full or relative path to the mo file to parse.
+    </li>
+  </ul>
+  <p>**Examples**:</p>
 <pre class="py-doctest">
-<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> detect_encoding(<span class="py-string">'tests/test_noencoding.po'</span>)
+<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(detect_encoding(<span class="py-string">'tests/test_noencoding.po'</span>))
 <span class="py-output">utf-8</span>
-<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> detect_encoding(<span class="py-string">'tests/test_utf8.po'</span>)
+<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(detect_encoding(<span class="py-string">'tests/test_utf8.po'</span>))
 <span class="py-output">UTF-8</span>
-<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> detect_encoding(<span class="py-string">'tests/test_utf8.mo'</span>)
+<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(detect_encoding(<span class="py-string">'tests/test_utf8.mo'</span>))
 <span class="py-output">UTF-8</span>
-<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> detect_encoding(<span class="py-string">'tests/test_iso-8859-15.po'</span>)
+<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(detect_encoding(<span class="py-string">'tests/test_iso-8859-15.po'</span>))
 <span class="py-output">ISO_8859-15</span>
-<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> detect_encoding(<span class="py-string">'tests/test_iso-8859-15.mo'</span>)
+<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(detect_encoding(<span class="py-string">'tests/test_iso-8859-15.mo'</span>))
 <span class="py-output">ISO_8859-15</span></pre>
   <dl class="fields">
   </dl>
 </td></tr></table>
 </div>
-<a name="quote"></a>
+<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">quote</span>(<span class="sig-arg">st</span>)</span>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">escape</span>(<span class="sig-arg">st</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    ><span class="codelink"><a href="polib-pysrc.html#quote">source&nbsp;code</a></span>&nbsp;
+    ><span class="codelink"><a href="polib-pysrc.html#escape">source&nbsp;code</a></span>&nbsp;
     </td>
-  </table>
+  </tr></table>
   
-  <p>Quote and return the given string <em>st</em>.</p>
-<p><strong>Examples</strong>:</p>
+  <p>Escape special chars and return the given string *st*.</p>
+  <p>**Examples**:</p>
 <pre class="py-doctest">
-<span class="py-prompt">&gt;&gt;&gt; </span>quote('\t <span class="py-keyword">and</span> \n <span class="py-keyword">and</span> \r <span class="py-keyword">and</span> &quot; <span class="py-keyword">and</span> \\')
+<span class="py-prompt">&gt;&gt;&gt; </span>escape('\t <span class="py-keyword">and</span> \n <span class="py-keyword">and</span> \r <span class="py-keyword">and</span> &quot; <span class="py-keyword">and</span> \\')
 <span class="py-output">'\\t and \\n and \\r and \\&quot; and \\\\'</span></pre>
   <dl class="fields">
   </dl>
 </td></tr></table>
 </div>
-<a name="unquote"></a>
+<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">unquote</span>(<span class="sig-arg">st</span>)</span>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">unescape</span>(<span class="sig-arg">st</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    ><span class="codelink"><a href="polib-pysrc.html#unquote">source&nbsp;code</a></span>&nbsp;
+    ><span class="codelink"><a href="polib-pysrc.html#unescape">source&nbsp;code</a></span>&nbsp;
     </td>
-  </table>
+  </tr></table>
   
-  <p>Unquote and return the given string <em>st</em>.</p>
-<p><strong>Examples</strong>:</p>
+  <p>Unescape special chars and return the given string *st*.</p>
+  <p>**Examples**:</p>
 <pre class="py-doctest">
-<span class="py-prompt">&gt;&gt;&gt; </span>unquote('\\t <span class="py-keyword">and</span> \\n <span class="py-keyword">and</span> \\r <span class="py-keyword">and</span> \\&quot; <span class="py-keyword">and</span> \\\\')
+<span class="py-prompt">&gt;&gt;&gt; </span>unescape('\\t <span class="py-keyword">and</span> \\n <span class="py-keyword">and</span> \\r <span class="py-keyword">and</span> \\&quot; <span class="py-keyword">and</span> \\\\')
 <span class="py-output">'\t and \n and \r and &quot; and \\'</span></pre>
   <dl class="fields">
   </dl>
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0beta1 on Fri Dec 21 11:05:36 2007
+    Generated by Epydoc 3.0.1 on Wed Nov 26 19:13:55 2008
     </td>
     <td align="right" class="footer">
-      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
     </td>
   </tr>
 </table>
   // 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()
+  checkCookie();
   // -->
 </script>
-  
 </body>
 </html>

docs/api/polib-pysrc.html

 <a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
 <a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
 <a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># License: MIT (see LICENSE file provided)</tt> </tt>
-<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># vim600: fdm=marker tabstop=4 shiftwidth=4 expandtab ai</tt> </tt>
+<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:</tt> </tt>
 <a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"><tt class="py-comment"># Description {{{</tt> </tt>
-<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-docstring">"""</tt> </tt>
-<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"><tt class="py-docstring">**polib** allows you to manipulate, create, modify gettext files (pot, po</tt> </tt>
-<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line"><tt class="py-docstring">and mo files).  You can load existing files, iterate through it's entries,</tt> </tt>
-<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line"><tt class="py-docstring">add, modify entries, comments or metadata, etc... or create new po files</tt> </tt>
-<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"><tt class="py-docstring">from scratch.</tt> </tt>
-<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"><tt class="py-docstring">**polib** provides a simple and pythonic API, exporting only three</tt> </tt>
-<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line"><tt class="py-docstring">convenience functions (*pofile*, *mofile* and *detect_encoding*), and the</tt> </tt>
-<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line"><tt class="py-docstring">four core classes, *POFile*, *MOFile*, *POEntry* and *MOEntry* for creating</tt> </tt>
-<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line"><tt class="py-docstring">new files/entries.</tt> </tt>
-<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L19"></a><tt class="py-lineno">  19</tt>  <tt class="py-line"><tt class="py-docstring">**Basic example**:</tt> </tt>
-<a name="L20"></a><tt class="py-lineno">  20</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; import polib</tt> </tt>
-<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # load an existing po file</tt> </tt>
-<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; po = polib.pofile('tests/test_utf8.po')</tt> </tt>
-<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; for entry in po:</tt> </tt>
-<a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line"><tt class="py-docstring">...     # do something with entry...</tt> </tt>
-<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line"><tt class="py-docstring">...     pass</tt> </tt>
-<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # add an entry</tt> </tt>
-<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; entry = polib.POEntry(msgid='Welcome', msgstr='Bienvenue')</tt> </tt>
-<a name="L29"></a><tt class="py-lineno">  29</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; entry.occurrences = [('welcome.py', '12'), ('anotherfile.py', '34')]</tt> </tt>
-<a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; po.append(entry)</tt> </tt>
-<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # to save our modified po file:</tt> </tt>
-<a name="L32"></a><tt class="py-lineno">  32</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # po.save()</tt> </tt>
-<a name="L33"></a><tt class="py-lineno">  33</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # or you may want to compile the po file</tt> </tt>
-<a name="L34"></a><tt class="py-lineno">  34</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # po.save_as_mofile('tests/test_utf8.mo')</tt> </tt>
-<a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
-<a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
-<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line"><tt class="py-name">__author__</tt>    <tt class="py-op">=</tt> <tt class="py-string">'David JEAN LOUIS &lt;izimobil@gmail.com&gt;'</tt> </tt>
-<a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line"><tt class="py-name">__version__</tt>   <tt class="py-op">=</tt> <tt class="py-string">'0.3.1'</tt> </tt>
+<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
+<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt class="py-docstring">**polib** allows you to manipulate, create, modify gettext files (pot, po</tt> </tt>
+<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"><tt class="py-docstring">and mo files).  You can load existing files, iterate through it's entries,</tt> </tt>
+<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line"><tt class="py-docstring">add, modify entries, comments or metadata, etc... or create new po files</tt> </tt>
+<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line"><tt class="py-docstring">from scratch.</tt> </tt>
+<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt class="py-docstring">**polib** provides a simple and pythonic API, exporting only three</tt> </tt>
+<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"><tt class="py-docstring">convenience functions (*pofile*, *mofile* and *detect_encoding*), and the</tt> </tt>
+<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line"><tt class="py-docstring">four core classes, *POFile*, *MOFile*, *POEntry* and *MOEntry* for creating</tt> </tt>
+<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line"><tt class="py-docstring">new files/entries.</tt> </tt>
+<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"><tt class="py-docstring">**Basic example**:</tt> </tt>
+<a name="L19"></a><tt class="py-lineno">  19</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L20"></a><tt class="py-lineno">  20</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; import polib</tt> </tt>
+<a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # load an existing po file</tt> </tt>
+<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; po = polib.pofile('tests/test_utf8.po')</tt> </tt>
+<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; for entry in po:</tt> </tt>
+<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line"><tt class="py-docstring">...     # do something with entry...</tt> </tt>
+<a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line"><tt class="py-docstring">...     pass</tt> </tt>
+<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # add an entry</tt> </tt>
+<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; entry = polib.POEntry(msgid='Welcome', msgstr='Bienvenue')</tt> </tt>
+<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; entry.occurrences = [('welcome.py', '12'), ('anotherfile.py', '34')]</tt> </tt>
+<a name="L29"></a><tt class="py-lineno">  29</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; po.append(entry)</tt> </tt>
+<a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # to save our modified po file:</tt> </tt>
+<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # po.save()</tt> </tt>
+<a name="L32"></a><tt class="py-lineno">  32</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # or you may want to compile the po file</tt> </tt>
+<a name="L33"></a><tt class="py-lineno">  33</tt>  <tt class="py-line"><tt class="py-docstring">&gt;&gt;&gt; # po.save_as_mofile('tests/test_utf8.mo')</tt> </tt>
+<a name="L34"></a><tt class="py-lineno">  34</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
+<a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line"> </tt>
+<a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line"><tt class="py-name">__author__</tt>    <tt class="py-op">=</tt> <tt class="py-string">'David JEAN LOUIS &lt;izimobil@gmail.com&gt;'</tt> </tt>
+<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line"><tt class="py-name">__version__</tt>   <tt class="py-op">=</tt> <tt class="py-string">'0.3.1'</tt> </tt>
+<a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line"><tt class="py-name">__all__</tt>       <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'pofile'</tt><tt class="py-op">,</tt> <tt class="py-string">'POFile'</tt><tt class="py-op">,</tt> <tt class="py-string">'POEntry'</tt><tt class="py-op">,</tt> <tt class="py-string">'mofile'</tt><tt class="py-op">,</tt> <tt class="py-string">'MOFile'</tt><tt class="py-op">,</tt> <tt class="py-string">'MOEntry'</tt><tt class="py-op">,</tt> </tt>
+<a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line">                 <tt class="py-string">'detect_encoding'</tt><tt class="py-op">,</tt> <tt class="py-string">'escape'</tt><tt class="py-op">,</tt> <tt class="py-string">'unescape'</tt><tt class="py-op">]</tt> </tt>
 <a name="L40"></a><tt class="py-lineno">  40</tt>  <tt class="py-line"> </tt>
-<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line"> </tt>
-<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line"><tt class="py-comment"># dependencies {{{</tt> </tt>
-<a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L44"></a><tt class="py-lineno">  44</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">struct</tt> </tt>
-<a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">textwrap</tt> </tt>
-<a name="L46"></a><tt class="py-lineno">  46</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">warnings</tt> </tt>
-<a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">,</tt> <tt class="py-name">exc</tt><tt class="py-op">:</tt> </tt>
-<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line">    <tt class="py-keyword">raise</tt> <tt class="py-name">ImportError</tt><tt class="py-op">(</tt><tt class="py-string">'polib requires python 2.3 or later with the standard'</tt> \ </tt>
-<a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line">        <tt class="py-string">' modules "struct", "textwrap" and "warnings" (details: %s)'</tt> <tt class="py-op">%</tt> <tt class="py-name">exc</tt><tt class="py-op">)</tt> </tt>
-<a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
-<a name="L51"></a><tt class="py-lineno">  51</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'pofile'</tt><tt class="py-op">,</tt> <tt class="py-string">'POFile'</tt><tt class="py-op">,</tt> <tt class="py-string">'POEntry'</tt><tt class="py-op">,</tt> <tt class="py-string">'mofile'</tt><tt class="py-op">,</tt> <tt class="py-string">'MOFile'</tt><tt class="py-op">,</tt> <tt class="py-string">'MOEntry'</tt><tt class="py-op">,</tt> </tt>
-<a name="L53"></a><tt class="py-lineno">  53</tt>  <tt class="py-line">           <tt class="py-string">'detect_encoding'</tt><tt class="py-op">,</tt> <tt class="py-string">'quote'</tt><tt class="py-op">,</tt> <tt class="py-string">'unquote'</tt><tt class="py-op">]</tt> </tt>
-<a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line"> </tt>
-<a name="L55"></a><tt class="py-lineno">  55</tt>  <tt class="py-line"><tt class="py-comment"># shortcuts for performance improvement {{{</tt> </tt>
-<a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># yes, yes, this is quite ugly but *very* efficient</tt> </tt>
-<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-name">_dictget</tt>    <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt class="py-name">get</tt> </tt>
-<a name="L58"></a><tt class="py-lineno">  58</tt>  <tt class="py-line"><tt class="py-name">_listappend</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">.</tt><tt class="py-name">append</tt> </tt>
-<a name="L59"></a><tt class="py-lineno">  59</tt>  <tt class="py-line"><tt class="py-name">_listpop</tt>    <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt> </tt>
-<a name="L60"></a><tt class="py-lineno">  60</tt>  <tt class="py-line"><tt class="py-name">_strjoin</tt>    <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">.</tt><tt class="py-name">join</tt> </tt>
-<a name="L61"></a><tt class="py-lineno">  61</tt>  <tt class="py-line"><tt class="py-name">_strsplit</tt>   <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">.</tt><tt class="py-name">split</tt> </tt>
-<a name="L62"></a><tt class="py-lineno">  62</tt>  <tt class="py-line"><tt class="py-name">_strstrip</tt>   <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt> </tt>
-<a name="L63"></a><tt class="py-lineno">  63</tt>  <tt class="py-line"><tt class="py-name">_strreplace</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt> </tt>
-<a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line"><tt class="py-name">_textwrap</tt>   <tt class="py-op">=</tt> <tt class="py-name">textwrap</tt><tt class="py-op">.</tt><tt class="py-name">wrap</tt> </tt>
-<a name="L65"></a><tt class="py-lineno">  65</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
-<a name="L66"></a><tt class="py-lineno">  66</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable polib.default_encoding=polib-module.html#default_encoding"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-0', 'default_encoding', 'link-0');">default_encoding</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'utf-8'</tt> </tt>
-<a name="L68"></a><tt class="py-lineno">  68</tt>  <tt class="py-line"> </tt>
-<a name="pofile"></a><div id="pofile-def"><a name="L69"></a><tt class="py-lineno">  69</tt> <a class="py-toggle" href="#" id="pofile-toggle" onclick="return toggle('pofile');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#pofile">pofile</a><tt class="py-op">(</tt><tt class="py-param">fpath</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="pofile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="pofile-expanded"><a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
-<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line"><tt class="py-docstring">    Convenience function that parse the po/pot file *fpath* and return</tt> </tt>
-<a name="L72"></a><tt class="py-lineno">  72</tt>  <tt class="py-line"><tt class="py-docstring">    a POFile instance.</tt> </tt>
-<a name="L73"></a><tt class="py-lineno">  73</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L74"></a><tt class="py-lineno">  74</tt>  <tt class="py-line"><tt class="py-docstring">    **Keyword arguments**:</tt> </tt>
-<a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line"><tt class="py-docstring">      - *fpath*: string, full or relative path to the po/pot file to parse</tt> </tt>
-<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line"><tt class="py-docstring">      - *wrapwidth*: integer, the wrap width, only useful when -w option was</tt> </tt>
-<a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line"><tt class="py-docstring">        passed to xgettext (optional, default to 78)</tt> </tt>
-<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line"><tt class="py-docstring">      - *autodetect_encoding*: boolean, if set to False the function will</tt> </tt>
-<a name="L79"></a><tt class="py-lineno">  79</tt>  <tt class="py-line"><tt class="py-docstring">        not try to detect the po file encoding (optional, default to True)</tt> </tt>
-<a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line"><tt class="py-docstring">      - *encoding*: string, an encoding, only relevant if autodetect_encoding</tt> </tt>
-<a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line"><tt class="py-docstring">        is set to False</tt> </tt>
-<a name="L82"></a><tt class="py-lineno">  82</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L83"></a><tt class="py-lineno">  83</tt>  <tt class="py-line"><tt class="py-docstring">    **Example**:</tt> </tt>
-<a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L85"></a><tt class="py-lineno">  85</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import polib</tt> </tt>
-<a name="L86"></a><tt class="py-lineno">  86</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po = polib.pofile('tests/test_utf8.po')</tt> </tt>
-<a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po #doctest: +ELLIPSIS</tt> </tt>
-<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;POFile instance at ...&gt;</tt> </tt>
-<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import os, tempfile</tt> </tt>
-<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; for fname in ['test_iso-8859-15.po', 'test_utf8.po']:</tt> </tt>
-<a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_po = polib.pofile('tests/'+fname)</tt> </tt>
-<a name="L92"></a><tt class="py-lineno">  92</tt>  <tt class="py-line"><tt class="py-docstring">    ...     tmpf = tempfile.NamedTemporaryFile().name</tt> </tt>
-<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_po.save(tmpf)</tt> </tt>
-<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line"><tt class="py-docstring">    ...     try:</tt> </tt>
-<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line"><tt class="py-docstring">    ...         new_po = polib.pofile(tmpf)</tt> </tt>
-<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line"><tt class="py-docstring">    ...         for old, new in zip(orig_po, new_po):</tt> </tt>
-<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line"><tt class="py-docstring">    ...             if old.msgid != new.msgid:</tt> </tt>
-<a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 old.msgid</tt> </tt>
-<a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 new.msgid</tt> </tt>
-<a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line"><tt class="py-docstring">    ...             if old.msgstr != new.msgstr:</tt> </tt>
-<a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 old.msgid</tt> </tt>
-<a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 new.msgid</tt> </tt>
-<a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line"><tt class="py-docstring">    ...     finally:</tt> </tt>
-<a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line"><tt class="py-docstring">    ...         os.unlink(tmpf)</tt> </tt>
-<a name="L105"></a><tt class="py-lineno"> 105</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
-<a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line">    <tt class="py-comment"># pofile {{{</tt> </tt>
-<a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-name">_dictget</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">,</tt> <tt class="py-string">'autodetect_encoding'</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
-<a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt id="link-1" class="py-name" targets="Function polib.detect_encoding()=polib-module.html#detect_encoding"><a title="polib.detect_encoding" class="py-name" href="#" onclick="return doclink('link-1', 'detect_encoding', 'link-1');">detect_encoding</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
-<a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt class="py-name">_dictget</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">,</tt> <tt class="py-string">'encoding'</tt><tt class="py-op">,</tt> <tt id="link-2" class="py-name"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-2', 'default_encoding', 'link-0');">default_encoding</a></tt><tt class="py-op">)</tt> </tt>
-<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line">    <tt class="py-name">parser</tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name" targets="Class polib._POFileParser=polib._POFileParser-class.html"><a title="polib._POFileParser" class="py-name" href="#" onclick="return doclink('link-3', '_POFileParser', 'link-3');">_POFileParser</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
-<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line">    <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method polib._MOFileParser.parse()=polib._MOFileParser-class.html#parse,Method polib._POFileParser.parse()=polib._POFileParser-class.html#parse"><a title="polib._MOFileParser.parse
+<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">struct</tt> </tt>
+<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">textwrap</tt> </tt>
+<a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">warnings</tt> </tt>
+<a name="L44"></a><tt class="py-lineno">  44</tt>  <tt class="py-line"> </tt>
+<a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable polib.default_encoding=polib-module.html#default_encoding"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-0', 'default_encoding', 'link-0');">default_encoding</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'utf-8'</tt> </tt>
+<a name="L46"></a><tt class="py-lineno">  46</tt>  <tt class="py-line"> </tt>
+<a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line"><tt class="py-comment"># shortcuts for performance improvement {{{</tt> </tt>
+<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
+<a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line"><tt class="py-comment"># this is quite ugly but *very* efficient</tt> </tt>
+<a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-name">_dictget</tt>    <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt class="py-name">get</tt> </tt>
+<a name="L51"></a><tt class="py-lineno">  51</tt>  <tt class="py-line"><tt class="py-name">_listappend</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">.</tt><tt class="py-name">append</tt> </tt>
+<a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line"><tt class="py-name">_listpop</tt>    <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt> </tt>
+<a name="L53"></a><tt class="py-lineno">  53</tt>  <tt class="py-line"><tt class="py-name">_strjoin</tt>    <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">.</tt><tt class="py-name">join</tt> </tt>
+<a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line"><tt class="py-name">_strsplit</tt>   <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">.</tt><tt class="py-name">split</tt> </tt>
+<a name="L55"></a><tt class="py-lineno">  55</tt>  <tt class="py-line"><tt class="py-name">_strstrip</tt>   <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt> </tt>
+<a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line"><tt class="py-name">_strreplace</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt> </tt>
+<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line"><tt class="py-name">_textwrap</tt>   <tt class="py-op">=</tt> <tt class="py-name">textwrap</tt><tt class="py-op">.</tt><tt class="py-name">wrap</tt> </tt>
+<a name="L58"></a><tt class="py-lineno">  58</tt>  <tt class="py-line"> </tt>
+<a name="L59"></a><tt class="py-lineno">  59</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
+<a name="L60"></a><tt class="py-lineno">  60</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># function pofile() {{{</tt> </tt>
+<a name="L61"></a><tt class="py-lineno">  61</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
+<a name="pofile"></a><div id="pofile-def"><a name="L62"></a><tt class="py-lineno">  62</tt> <a class="py-toggle" href="#" id="pofile-toggle" onclick="return toggle('pofile');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#pofile">pofile</a><tt class="py-op">(</tt><tt class="py-param">fpath</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="pofile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="pofile-expanded"><a name="L63"></a><tt class="py-lineno">  63</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line"><tt class="py-docstring">    Convenience function that parse the po/pot file *fpath* and return</tt> </tt>
+<a name="L65"></a><tt class="py-lineno">  65</tt>  <tt class="py-line"><tt class="py-docstring">    a POFile instance.</tt> </tt>
+<a name="L66"></a><tt class="py-lineno">  66</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line"><tt class="py-docstring">    **Keyword arguments**:</tt> </tt>
+<a name="L68"></a><tt class="py-lineno">  68</tt>  <tt class="py-line"><tt class="py-docstring">      - *fpath*: string, full or relative path to the po/pot file to parse</tt> </tt>
+<a name="L69"></a><tt class="py-lineno">  69</tt>  <tt class="py-line"><tt class="py-docstring">      - *wrapwidth*: integer, the wrap width, only useful when -w option was</tt> </tt>
+<a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line"><tt class="py-docstring">        passed to xgettext (optional, default to 78)</tt> </tt>
+<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line"><tt class="py-docstring">      - *autodetect_encoding*: boolean, if set to False the function will</tt> </tt>
+<a name="L72"></a><tt class="py-lineno">  72</tt>  <tt class="py-line"><tt class="py-docstring">        not try to detect the po file encoding (optional, default to True)</tt> </tt>
+<a name="L73"></a><tt class="py-lineno">  73</tt>  <tt class="py-line"><tt class="py-docstring">      - *encoding*: string, an encoding, only relevant if autodetect_encoding</tt> </tt>
+<a name="L74"></a><tt class="py-lineno">  74</tt>  <tt class="py-line"><tt class="py-docstring">        is set to False</tt> </tt>
+<a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line"><tt class="py-docstring">    **Example**:</tt> </tt>
+<a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import polib</tt> </tt>
+<a name="L79"></a><tt class="py-lineno">  79</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po = polib.pofile('tests/test_utf8.po')</tt> </tt>
+<a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po #doctest: +ELLIPSIS</tt> </tt>
+<a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;POFile instance at ...&gt;</tt> </tt>
+<a name="L82"></a><tt class="py-lineno">  82</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import os, tempfile</tt> </tt>
+<a name="L83"></a><tt class="py-lineno">  83</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; for fname in ['test_iso-8859-15.po', 'test_utf8.po']:</tt> </tt>
+<a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_po = polib.pofile('tests/'+fname)</tt> </tt>
+<a name="L85"></a><tt class="py-lineno">  85</tt>  <tt class="py-line"><tt class="py-docstring">    ...     tmpf = tempfile.NamedTemporaryFile().name</tt> </tt>
+<a name="L86"></a><tt class="py-lineno">  86</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_po.save(tmpf)</tt> </tt>
+<a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line"><tt class="py-docstring">    ...     try:</tt> </tt>
+<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line"><tt class="py-docstring">    ...         new_po = polib.pofile(tmpf)</tt> </tt>
+<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line"><tt class="py-docstring">    ...         for old, new in zip(orig_po, new_po):</tt> </tt>
+<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line"><tt class="py-docstring">    ...             if old.msgid != new.msgid:</tt> </tt>
+<a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 old.msgid</tt> </tt>
+<a name="L92"></a><tt class="py-lineno">  92</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 new.msgid</tt> </tt>
+<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line"><tt class="py-docstring">    ...             if old.msgstr != new.msgstr:</tt> </tt>
+<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 old.msgid</tt> </tt>
+<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 new.msgid</tt> </tt>
+<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line"><tt class="py-docstring">    ...     finally:</tt> </tt>
+<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line"><tt class="py-docstring">    ...         os.unlink(tmpf)</tt> </tt>
+<a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">_dictget</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">,</tt> <tt class="py-string">'autodetect_encoding'</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
+<a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt id="link-1" class="py-name" targets="Function polib.detect_encoding()=polib-module.html#detect_encoding"><a title="polib.detect_encoding" class="py-name" href="#" onclick="return doclink('link-1', 'detect_encoding', 'link-1');">detect_encoding</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
+<a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt class="py-name">_dictget</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">,</tt> <tt class="py-string">'encoding'</tt><tt class="py-op">,</tt> <tt id="link-2" class="py-name"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-2', 'default_encoding', 'link-0');">default_encoding</a></tt><tt class="py-op">)</tt> </tt>
+<a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line">    <tt class="py-name">parser</tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name" targets="Class polib._POFileParser=polib._POFileParser-class.html"><a title="polib._POFileParser" class="py-name" href="#" onclick="return doclink('link-3', '_POFileParser', 'link-3');">_POFileParser</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
+<a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line">    <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method polib._MOFileParser.parse()=polib._MOFileParser-class.html#parse,Method polib._POFileParser.parse()=polib._POFileParser-class.html#parse"><a title="polib._MOFileParser.parse
 polib._POFileParser.parse" class="py-name" href="#" onclick="return doclink('link-4', 'parse', 'link-4');">parse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line">    <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt class="py-name">wrapwidth</tt> <tt class="py-op">=</tt> <tt class="py-name">_dictget</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">,</tt> <tt class="py-string">'wrapwidth'</tt><tt class="py-op">,</tt> <tt class="py-number">78</tt><tt class="py-op">)</tt> </tt>
-<a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line">    <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt class="py-name">encoding</tt>  <tt class="py-op">=</tt> <tt class="py-name">enc</tt> </tt>
-<a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">instance</tt> </tt>
-</div><a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line">    <tt class="py-comment"># }}}</tt> </tt>
-<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line"> </tt>
-<a name="mofile"></a><div id="mofile-def"><a name="L119"></a><tt class="py-lineno"> 119</tt> <a class="py-toggle" href="#" id="mofile-toggle" onclick="return toggle('mofile');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#mofile">mofile</a><tt class="py-op">(</tt><tt class="py-param">fpath</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="mofile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="mofile-expanded"><a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
-<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line"><tt class="py-docstring">    Convenience function that parse the mo file *fpath* and return</tt> </tt>
-<a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line"><tt class="py-docstring">    a MOFile instance.</tt> </tt>
-<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line"><tt class="py-docstring">    **Keyword arguments**:</tt> </tt>
-<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line"><tt class="py-docstring">      - *fpath*: string, full or relative path to the mo file to parse</tt> </tt>
-<a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line"><tt class="py-docstring">      - *wrapwidth*: integer, the wrap width, only useful when -w option was</tt> </tt>
-<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line"><tt class="py-docstring">        passed to xgettext to generate the po file that was used to format</tt> </tt>
-<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line"><tt class="py-docstring">        the mo file (optional, default to 78)</tt> </tt>
-<a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line"><tt class="py-docstring">      - *autodetect_encoding*: boolean, if set to False the function will</tt> </tt>
-<a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line"><tt class="py-docstring">        not try to detect the po file encoding (optional, default to True)</tt> </tt>
-<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line"><tt class="py-docstring">      - *encoding*: string, an encoding, only relevant if autodetect_encoding</tt> </tt>
-<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line"><tt class="py-docstring">        is set to False</tt> </tt>
-<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line"><tt class="py-docstring">    **Example**:</tt> </tt>
-<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import polib</tt> </tt>
-<a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo = polib.mofile('tests/test_utf8.mo')</tt> </tt>
-<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo #doctest: +ELLIPSIS</tt> </tt>
-<a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;MOFile instance at ...&gt;</tt> </tt>
-<a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import os, tempfile</tt> </tt>
-<a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; for fname in ['test_iso-8859-15.mo', 'test_utf8.mo']:</tt> </tt>
-<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_mo = polib.mofile('tests/'+fname)</tt> </tt>
-<a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line"><tt class="py-docstring">    ...     tmpf = tempfile.NamedTemporaryFile().name</tt> </tt>
-<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_mo.save(tmpf)</tt> </tt>
-<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line"><tt class="py-docstring">    ...     try:</tt> </tt>
-<a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line"><tt class="py-docstring">    ...         new_mo = polib.mofile(tmpf)</tt> </tt>
-<a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line"><tt class="py-docstring">    ...         for old, new in zip(orig_mo, new_mo):</tt> </tt>
-<a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line"><tt class="py-docstring">    ...             if old.msgid != new.msgid:</tt> </tt>
-<a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 old.msgstr</tt> </tt>
-<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 new.msgstr</tt> </tt>
-<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line"><tt class="py-docstring">    ...     finally:</tt> </tt>
-<a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line"><tt class="py-docstring">    ...         os.unlink(tmpf)</tt> </tt>
-<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
-<a name="L154"></a><tt class="py-lineno"> 154</tt>  <tt class="py-line">    <tt class="py-comment"># mofile {{{</tt> </tt>
-<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-keyword">if</tt> <tt class="py-name">_dictget</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">,</tt> <tt class="py-string">'autodetect_encoding'</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
-<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="polib.detect_encoding" class="py-name" href="#" onclick="return doclink('link-5', 'detect_encoding', 'link-1');">detect_encoding</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
-<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt class="py-name">_dictget</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">,</tt> <tt class="py-string">'encoding'</tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-6', 'default_encoding', 'link-0');">default_encoding</a></tt><tt class="py-op">)</tt> </tt>
-<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line">    <tt class="py-name">parser</tt> <tt class="py-op">=</tt> <tt id="link-7" class="py-name" targets="Class polib._MOFileParser=polib._MOFileParser-class.html"><a title="polib._MOFileParser" class="py-name" href="#" onclick="return doclink('link-7', '_MOFileParser', 'link-7');">_MOFileParser</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
-<a name="L160"></a><tt class="py-lineno"> 160</tt>  <tt class="py-line">    <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="polib._MOFileParser.parse
+<a name="L105"></a><tt class="py-lineno"> 105</tt>  <tt class="py-line">    <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt class="py-name">wrapwidth</tt> <tt class="py-op">=</tt> <tt class="py-name">_dictget</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">,</tt> <tt class="py-string">'wrapwidth'</tt><tt class="py-op">,</tt> <tt class="py-number">78</tt><tt class="py-op">)</tt> </tt>
+<a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line">    <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt class="py-name">encoding</tt>  <tt class="py-op">=</tt> <tt class="py-name">enc</tt> </tt>
+<a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">instance</tt> </tt>
+</div><a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line"> </tt>
+<a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
+<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># function mofile() {{{</tt> </tt>
+<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
+<a name="mofile"></a><div id="mofile-def"><a name="L112"></a><tt class="py-lineno"> 112</tt> <a class="py-toggle" href="#" id="mofile-toggle" onclick="return toggle('mofile');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#mofile">mofile</a><tt class="py-op">(</tt><tt class="py-param">fpath</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="mofile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="mofile-expanded"><a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line"><tt class="py-docstring">    Convenience function that parse the mo file *fpath* and return</tt> </tt>
+<a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line"><tt class="py-docstring">    a MOFile instance.</tt> </tt>
+<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line"><tt class="py-docstring">    **Keyword arguments**:</tt> </tt>
+<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line"><tt class="py-docstring">      - *fpath*: string, full or relative path to the mo file to parse</tt> </tt>
+<a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line"><tt class="py-docstring">      - *wrapwidth*: integer, the wrap width, only useful when -w option was</tt> </tt>
+<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line"><tt class="py-docstring">        passed to xgettext to generate the po file that was used to format</tt> </tt>
+<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line"><tt class="py-docstring">        the mo file (optional, default to 78)</tt> </tt>
+<a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line"><tt class="py-docstring">      - *autodetect_encoding*: boolean, if set to False the function will</tt> </tt>
+<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line"><tt class="py-docstring">        not try to detect the po file encoding (optional, default to True)</tt> </tt>
+<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line"><tt class="py-docstring">      - *encoding*: string, an encoding, only relevant if autodetect_encoding</tt> </tt>
+<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line"><tt class="py-docstring">        is set to False</tt> </tt>
+<a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line"><tt class="py-docstring">    **Example**:</tt> </tt>
+<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import polib</tt> </tt>
+<a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo = polib.mofile('tests/test_utf8.mo')</tt> </tt>
+<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo #doctest: +ELLIPSIS</tt> </tt>
+<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;MOFile instance at ...&gt;</tt> </tt>
+<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import os, tempfile</tt> </tt>
+<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; for fname in ['test_iso-8859-15.mo', 'test_utf8.mo']:</tt> </tt>
+<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_mo = polib.mofile('tests/'+fname)</tt> </tt>
+<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line"><tt class="py-docstring">    ...     tmpf = tempfile.NamedTemporaryFile().name</tt> </tt>
+<a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_mo.save(tmpf)</tt> </tt>
+<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line"><tt class="py-docstring">    ...     try:</tt> </tt>
+<a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line"><tt class="py-docstring">    ...         new_mo = polib.mofile(tmpf)</tt> </tt>
+<a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line"><tt class="py-docstring">    ...         for old, new in zip(orig_mo, new_mo):</tt> </tt>
+<a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line"><tt class="py-docstring">    ...             if old.msgid != new.msgid:</tt> </tt>
+<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 old.msgstr</tt> </tt>
+<a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 new.msgstr</tt> </tt>
+<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line"><tt class="py-docstring">    ...     finally:</tt> </tt>
+<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line"><tt class="py-docstring">    ...         os.unlink(tmpf)</tt> </tt>
+<a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">_dictget</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">,</tt> <tt class="py-string">'autodetect_encoding'</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
+<a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="polib.detect_encoding" class="py-name" href="#" onclick="return doclink('link-5', 'detect_encoding', 'link-1');">detect_encoding</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
+<a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line&quo