comparison tools/jid.py @ 128:2240f34f6452

Primitivus: misc fixes + menubar first draft - Menu bar: first draft of class - Password widget fixed - change some str to unicode, notably for JID
author Goffi <goffi@goffi.org>
date Tue, 13 Jul 2010 02:24:59 +0800
parents a5b5fb5fc9fd
children
comparison
equal deleted inserted replaced
127:55d3ef84f01f 128:2240f34f6452
19 along with this program. If not, see <http://www.gnu.org/licenses/>. 19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 """ 20 """
21 21
22 22
23 23
24 class JID(str): 24 class JID(unicode):
25 """This class help manage JID (Node@Domaine/Resource)""" 25 """This class help manage JID (Node@Domaine/Resource)"""
26 26
27 def __new__(cls, jid): 27 def __new__(cls, jid):
28 self = str.__new__(cls, jid) 28 self = unicode.__new__(cls, jid)
29 self.__parse() 29 self.__parse()
30 return self 30 return self
31 31
32 def __parse(self): 32 def __parse(self):
33 """find node domaine and resource""" 33 """find node domaine and resource"""