def __init__(self,usr): self.usr = usr self.modelList = prices.getModelList() self.itemList = prices.getItemList() self.updateList() self.setAttribs()
def cmd_getItemList(packet): print "Sending Component list to {}".format(packet.usr.address[0]) sendPacket = websocket.PacketHandler.Packet(packet.usr) sendPacket.decoded = "/recvItemList {}".format(prices.getItemList()) packet.usr.send_packet = sendPacket