def __init__(self, comport=9, filename=None, mode='r', timeout=10):
        '''
        comport - integer com number for serial port
        filename and mode are for debug
        '''
        if filename is None:
            self.s = serial.Serial('COM%d' % comport, timeout=timeout)
        else:
            self.s = open(filename, mode)

        comport - integer com number for serial port
        filename and mode are for debug
        
recipes/Python/498085_Lego_Mindstorms_Bluetooth/recipe-498085.py