Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)

src/e/0/E-learning-HEAD/BuddyList.py   E-learning(Download)
 
from constants import MUC_GROUP_TITLE, DEFAULT_GROUP
from BuddyItem import BuddyItem
from AbstractContactList import AbstractContactList
from MUCItem import MUCItem
				if jid not in self.buddies.keys():
					show = self.connection.getShow(jid)
					self.buddies[jid] = BuddyItem(self, self.groups[group], jid, show, self.connection)
					self.buddies[jid].setName(self.connection.getName(jid))
				self.groups[group].addChild(self.buddies[jid])
			if not show:
				show = self.connection.getShow(jid)
			self.buddies[jid] = BuddyItem(self, self.groups[group], jid, show, self.connection)
			self.buddies[jid].setName(self.connection.getName(jid))
		self.groups[group].addChild(self.buddies[jid])
			# private msg from muc member
			if buddy + "/" + nick not in self.buddies.keys():
				self.buddies[buddy + "/" + nick] = BuddyItem(None, self.groups[MUC_GROUP_TITLE], buddy + "/" + nick, "-", 
					self.connection, nick, buddy)
				self.buddies[buddy + "/" + nick].setName(nick + " from " + buddy)

src/p/y/PyTalk-HEAD/pytalk/BuddyList.py   PyTalk(Download)
from PyQt4.QtGui import QTreeWidget, QTreeWidgetItem, QMenu, QIcon
from PyQt4.QtCore import Qt, SIGNAL
 
from BuddyItem import BuddyItem
from BuddyGroup import BuddyGroup
            self.addGroup(group)
            if jid not in self.buddies.keys():
                self.buddies[jid] = BuddyItem(self.groups[group],jid, self.connection)
                self.buddies[jid].setName(self.connection.getName(jid))
            self.groups[group].addChild(self.buddies[jid])
    def message(self, event):
        buddy = event.getFrom().getStripped()
        if buddy not in self.buddies.keys():
            self.buddies[buddy] = BuddyItem(None, buddy)
        self.buddies[buddy].receiveMessage(event)