Package translate :: Package storage :: Package placeables :: Module general :: Class OptionPlaceable

[hide private]
[frames] | no frames]

# Class OptionPlaceable

source code

Placeble handling command line options e.g. --help

Instance Methods | [hide private]

Inherited from `strelem.StringElem`: `__add__`, `__contains__`, `__eq__`, `__ge__`, `__getitem__`, `__getslice__`, `__gt__`, `__init__`, `__iter__`, `__le__`, `__len__`, `__lt__`, `__mul__`, `__ne__`, `__radd__`, `__repr__`, `__rmul__`, `__str__`, `__unicode__`, `apply_to_strings`, `copy`, `delete_elem`, `delete_range`, `depth_first`, `elem_at_offset`, `elem_offset`, `encode`, `find`, `find_elems_with`, `flatten`, `get_ancestor_where`, `get_index_data`, `get_parent_elem`, `insert`, `insert_between`, `isleaf`, `iter_depth_first`, `map`, `print_tree`, `prune`, `remove_type`, `translate`

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

Class Methods | [hide private]

parse(cls, pstr) A parser method to extract placeables from a string based on a regular expression. | source code

Class Variables | [hide private]

| istranslatable = `False` Whether this string is translatable into other languages.
| regex = `re.compile(r'`(?x)`\B`(`-`[`a`-`zA`-`Z`]``|`-`[`a`-`z-`]``+``)`\b')`
Inherited from `base.Ph`: `has_content` Inherited from `strelem.StringElem`: `iseditable`, `isfragile`, `isvisible`, `renderer`, `sub`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### parse(cls, pstr)
Class Method

source code

A parser method to extract placeables from a string based on a regular expression. Use this function as the `@parse()` method of a placeable class.

Parameters:
  - `pstr` - The string to parse into an instance of this class.
Returns:
  An instance of the current class, or `None` if the string not parseable by this class.
Overrides: strelem.StringElem.parse