pyxmpp2.utils

Package pyxmpp2 :: Module utils |
[hide private]

# Module utils

Utility functions for the pyxmpp package.

Functions | [hide private]
`bool` |
xml_elements_equal(element1, element2, ignore_level1_cdata=False) Check if two XML elements are equal. |
datetime_utc_to_local(utc) An ugly hack to convert naive `datetime.datetime` object containing UTC time to a naive `datetime.datetime` object with local time. |
datetime_local_to_utc(local) Simple function to convert naive `datetime.datetime` object containing local time to a naive `datetime.datetime` object with UTC time. |

Variables | [hide private]
| _MINUTE = `datetime.timedelta(0, 60)`
| _NULLDELTA = `datetime.timedelta(0)`

Function Details | [hide private]

### xml_elements_equal(element1, element2, ignore_level1_cdata=False) |
Check if two XML elements are equal. Parameters: `element1` (`ElementTree.Element`) - the first element to compare `element2` (`ElementTree.Element`) - the other element to compare `ignore_level1_cdata` (`bool`) - if direct text children of the elements should be ignored for the comparision Returns: `bool`

### datetime_utc_to_local(utc) |
An ugly hack to convert naive `datetime.datetime` object containing UTC time to a naive `datetime.datetime` object with local time. It seems standard Python 2.3 library doesn't provide any better way to do that.