def broadcast(self, url='', isDVD=False): from os.path import isfile if url=='DVD': isDVD=True url='' if not isDVD: if not isfile(url): return {'result':'Bad file'} for i in NetworkUtils.all_interfaces(): if i[0]!='lo': try: self.classroom.CommandStack[i[1]].append(['rootClean','239.255.255.0',NetworkUtils.ltspGW()]) except: #host not avaialble pass self.classroom.broadcast.clean_callbacks() self.classroom.broadcast.add_callback('started',self.startbcast) self.classroom.broadcast.add_callback('ended',self.stopbcast) result=self.classroom.broadcast.transmit(url,isDVD) if result!=True: self.stopbcast return {'result':result}