Package translate :: Package storage :: Module qm :: Class qmfile

[hide private]
[frames] | no frames]

# Class qmfile

source code

A class representing a .qm file.

Nested Classes | [hide private]

| UnitClass The class of units that will be instantiated and used by this class

Instance Methods | [hide private]

__init__(self, inputfile=None, unitclass=qmunit) Constructs a blank TranslationStore. | source code

__str__(self) Output a string representation of the .qm data file | source code

parse(self, input) parses the given file or file source string | source code

savefile(self, storefile) Writes the string representation to the given file (or filename). | source code

Inherited from `base.TranslationStore`: `__getstate__`, `__setstate__`, `add_unit_to_index`, `addsourceunit`, `addunit`, `findid`, `findunit`, `findunits`, `getids`, `getsourcelanguage`, `gettargetlanguage`, `getunits`, `isempty`, `makeindex`, `remove_unit_from_index`, `require_index`, `save`, `setsourcelanguage`, `settargetlanguage`, `translate`, `unit_iter`

Inherited from `base.TranslationStore` (private): `_assignname`

Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`

Class Methods | [hide private]

Inherited from `base.TranslationStore`: `parsefile`, `parsestring`

Class Variables | [hide private]

| Name = `_("Qt .qm file")` The human usable name of this store type
| Mimetypes = `["application/x-qm"]` A list of MIME types associated with this store type
| Extensions = `["qm"]` A list of file extentions associated with this store type
| _binary = `True` Indicates whether a file should be accessed as a binary file.
Inherited from `base.TranslationStore`: `suggestions_in_format`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, inputfile=None, unitclass=qmunit)
(Constructor)

source code

Constructs a blank TranslationStore.

Overrides: object.__init__
  (inherited documentation)

### __str__(self)
(Informal representation operator)

source code

Output a string representation of the .qm data file

Overrides: object.__str__

### parse(self, input)

source code

parses the given file or file source string

Overrides: base.TranslationStore.parse

### savefile(self, storefile)

source code

Writes the string representation to the given file (or filename).

Overrides: base.TranslationStore.savefile
  (inherited documentation)