from wakeonlan import wol ##---------------------------------------------------------------------------------------## class WOL(object): ##---------------------------------------------------------------------------------------## ##-----------------------------------------------------------------------------------## def __init__(self, devices): ##-----------------------------------------------------------------------------------## count = 0 for device in devices: self.devices[device] = devices[device]['mac'] ##-----------------------------------------------------------------------------------## def wakeDevice(self, device): ##-----------------------------------------------------------------------------------## if(device in self.devices): wol.send_magic_packet(self.devices[device])