'Manually control flow - when software flow control is enabled.
This will do the same as if XON (true) or XOFF (false) are received
from the other device and control the transmission accordingly.
WARNING: this function is not portable to different platforms!'

def set_output_flow_control(self, enable=True):

    if (not self.is_open):
        raise portNotOpenError
    if enable:
        win32.EscapeCommFunction(self._port_handle, win32.SETXON)
    else:
        win32.EscapeCommFunction(self._port_handle, win32.SETXOFF)
