mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-12-18 03:00:18 +00:00
e077204a16
The sleekxmpp.xmlstream.tostring and sleekxmpp.xmlstream.tostring26 packages have been merged to sleekxmpp.xmlstream.tostring. The __init__.py file will import the appropriate tostring function depending on the Python version. The setup.py file has been updated with the package changes. ElementBase is now a direct descendent of object and does not subclass ToString. Stanza objects now return their XML contents for __repr__.
19 lines
537 B
Python
19 lines
537 B
Python
"""
|
|
SleekXMPP: The Sleek XMPP Library
|
|
Copyright (C) 2010 Nathanael C. Fritz
|
|
This file is part of SleekXMPP.
|
|
|
|
See the file LICENSE for copying permission.
|
|
"""
|
|
|
|
import sys
|
|
|
|
# Import the correct tostring and xml_escape functions based on the Python
|
|
# version in order to properly handle Unicode.
|
|
|
|
if sys.version_info < (3, 0):
|
|
from sleekxmpp.xmlstream.tostring.tostring26 import tostring, xml_escape
|
|
else:
|
|
from sleekxmpp.xmlstream.tostring.tostring import tostring, xml_escape
|
|
|
|
__all__ = ['tostring', 'xml_escape']
|