#!/usr/bin/python # -*- coding:utf8 -*- import asyncore from ebus import EbusReader class MyEbusReader(EbusReader): def handle_ebus(self,ebus_packet): if ebus_packet.values() != dict(): print ebus_packet MyEbusReader() asyncore.loop()