Header entry in PO catalogs.
The PO header is syntactically just another entry in the catalog, but
with different semantics. Therefore, instead operating on it using Message, this
class provides a different set of interface attributes and methods.
|
__init__(self,
init=None)
Initializes the header by the given message or header. |
|
|
|
|
|
get(self,
att,
default=None)
Get attribute value. |
|
|
bool
|
__eq__(self,
ohdr)
Reports wheter headers are equal in all apparent parts. |
|
|
bool
|
__ne__(self,
ohdr)
Reports wheter headers are not equal in some apparent parts. |
|
|
the type that initialized the object
|
to_msg(self,
force=False)
Convert the header into ordinary message object. |
|
|
|
to_lines(self,
wrapf=<function wrap_field at 0x7f7182815320>,
force=False)
The line-representation of the header. |
|
|
|
to_string(self,
wrapf=<function wrap_field at 0x7f7182815320>,
force=False)
The string-representation of the header. |
|
|
list of pairs*
|
select_fields(self,
name)
Find header fields with the given name. |
|
|
string or default
|
get_field_value(self,
name,
default=None)
Get the value of the given header field. |
|
|
bool
|
replace_field_value(self,
name,
new_value,
nth=0)
Replace the value of the n-th occurence of the named header field. |
|
|
int
|
set_field(self,
name,
value,
after=None,
before=None,
reorder=False)
Set a header field to a value. |
|
|
int
|
remove_field(self,
name)
Remove header fields with the given name, if it exists. |
|
|
Inherited from monitored.Monitored :
__setattr__ ,
assert_spec_getattr ,
assert_spec_getitem ,
assert_spec_init ,
assert_spec_setattr ,
assert_spec_setitem ,
data
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|