(self, timeout)
Change timeout setting.
Change timeout setting.
Change timeout setting .
def setTimeout(self, timeout):
        """Change timeout setting."""
        if timeout is not None:
            try:
                timeout + 1     # test if it's a number, will throw a TypeError if not...
            except TypeError:
                raise ValueError("Not a valid timeout: %r" % (timeout,))
            if timeout < 0: raise ValueError("Not a valid timeout: %r" % (timeout,))
        self._timeout = timeout
        if self._isOpen: self._reconfigurePort()
def setTimeout ( self , timeout ) : if timeout is not None : try : timeout + 1 # test if it's a number, will throw a TypeError if not... except TypeError : raise ValueError ( "Not a valid timeout: %r" % ( timeout , ) ) if timeout < 0 : raise ValueError ( "Not a valid timeout: %r" % ( timeout , ) ) self . _timeout = timeout if self . _isOpen : self . _reconfigurePort ( )