def set_enable(self, on, channel=1):
        """ channel: 1=OP1, 2=OP2, 3=AUX, ALL=all channels"""
        if isinstance(channel, str):
            cmd = "OPALL %d" % int(on)
        elif isinstance(channel, int):
            cmd = "OP%d %d" % (channel, int(on))
        self.write(cmd)
def set_enable ( self , on , channel = 1 ) : if isinstance ( channel , str ) : cmd = "OPALL %d" % int ( on ) elif isinstance ( channel , int ) : cmd = "OP%d %d" % ( channel , int ( on ) ) self . write ( cmd )
channel: 1=OP1, 2=OP2, 3=AUX, ALL=all channels