(self, baudrate)
Change baud rate. It raises a ValueError if the port is open and the
        baud rate is not possible. If the port is closed, then the value is
        accepted and the exception is raised when the port is opened.
Change baud rate. It raises a ValueError if the port is open and the
        baud rate is not possible. If the port is closed, then the value is
        accepted and the exception is raised when the port is opened.
Change baud rate . It raises a ValueError if the port is open and the baud rate is not possible . If the port is closed then the value is accepted and the exception is raised when the port is opened .
def setBaudrate(self, baudrate):
        """Change baud rate. It raises a ValueError if the port is open and the
        baud rate is not possible. If the port is closed, then the value is
        accepted and the exception is raised when the port is opened."""
        try:
            b = int(baudrate)
        except TypeError:
            raise ValueError("Not a valid baudrate: %r" % (baudrate,))
        else:
            if b <= 0:
                raise ValueError("Not a valid baudrate: %r" % (baudrate,))
            self._baudrate = b
            if self._isOpen:  self._reconfigurePort()
def setBaudrate ( self , baudrate ) : try : b = int ( baudrate ) except TypeError : raise ValueError ( "Not a valid baudrate: %r" % ( baudrate , ) ) else : if b <= 0 : raise ValueError ( "Not a valid baudrate: %r" % ( baudrate , ) ) self . _baudrate = b if self . _isOpen : self . _reconfigurePort ( )