Home | Trees | Indices | Help |
---|
|
object --+ | list --+ | _BaseFile --+ | MOFile
Mo file reader/writer. MOFile objects inherit the list objects methods.
**Example**:
>>> mo = MOFile() >>> entry1 = POEntry( ... msgid="Some english text", ... msgstr="Un texte en anglais" ... ) >>> entry2 = POEntry( ... msgid="I need my dirty cheese", ... msgstr="Je veux mon sale fromage" ... ) >>> entry3 = MOEntry( ... msgid='Some entry with quotes " \"', ... msgstr='Un message unicode avec des quotes " \"' ... ) >>> mo.append(entry1) >>> mo.append(entry2) >>> mo.append(entry3) >>> print(mo) msgid "" msgstr "" <BLANKLINE> msgid "Some english text" msgstr "Un texte en anglais" <BLANKLINE> msgid "I need my dirty cheese" msgstr "Je veux mon sale fromage" <BLANKLINE> msgid "Some entry with quotes \" \"" msgstr "Un message unicode avec des quotes \" \"" <BLANKLINE>
|
|||
new list |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
Inherited from |
|
MOFile constructor. Mo files have two other properties:
|
Save the string representation of the file to *fpath*. **Keyword argument**:
|
Save the binary representation of the file to *fpath*. **Keyword argument**:
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Jun 5 14:32:06 2009 | http://epydoc.sourceforge.net |