'Open port with current settings. This may throw a SerialException
if the port cannot be opened.'

def open(self):

    if (self._port is None):
        raise SerialException('Port    must    be    configured    before    it    can    be    used.')
    if self.is_open:
        raise SerialException('Port    is    already    open.')
    try:
        self._port_handle = System.IO.Ports.SerialPort(self.portstr)
    except Exception as msg:
        self._port_handle = None
        raise SerialException(('could    not    open    port    %s:    %s' % (self.portstr, msg)))
    if (self._rts_state is None):
        self._rts_state = True
    if (self._dtr_state is None):
        self._dtr_state = True
    self._reconfigure_port()
    self._port_handle.Open()
    self.is_open = True
    if (not self._dsrdtr):
        self._update_dtr_state()
    if (not self._rtscts):
        self._update_rts_state()
    self.reset_input_buffer()
