def write(self, inputdata):
    'Write to a port on dummy_serial.\n\n        Args:\n            inputdata (string/bytes): data for sending to the port on dummy_serial. Will affect the response\n            for subsequent read operations.\n\n        Note that for Python2, the inputdata should be a **string**. For Python3 it should be of type **bytes**.\n\n        '
    if VERBOSE:
        _print_out((('\nDummy_serial: Writing to port. Given:' + repr(inputdata)) + '\n'))
    if (sys.version_info[0] > 2):
        if (not (type(inputdata) == bytes)):
            raise TypeError(('The input must be type bytes. Given:' + repr(inputdata)))
        inputstring = str(inputdata, encoding='latin1')
    else:
        inputstring = inputdata
    if (not self._isOpen):
        raise IOError(('Dummy_serial: Trying to write, but the port is not open. Given:' + repr(inputdata)))
    try:
        response = RESPONSES[inputstring]
    except:
        response = DEFAULT_RESPONSE
    self._waiting_data = response
Write to a port on dummy_serial.

Args:
    inputdata (string/bytes): data for sending to the port on dummy_serial. Will affect the response
    for subsequent read operations.

Note that for Python2, the inputdata should be a **string**. For Python3 it should be of type **bytes**.
def write(self, inputdata):
    'Write to a port on dummy_serial.\n\n        Args:\n            inputdata (string/bytes): data for sending to the port on dummy_serial. Will affect the response\n            for subsequent read operations.\n\n        Note that for Python2, the inputdata should be a **string**. For Python3 it should be of type **bytes**.\n\n        '
    if VERBOSE:
        _print_out((('\nDummy_serial: Writing to port. Given:' + repr(inputdata)) + '\n'))
    if (sys.version_info[0] > 2):
        if (not (type(inputdata) == bytes)):
            raise TypeError(('The input must be type bytes. Given:' + repr(inputdata)))
        inputstring = str(inputdata, encoding='latin1')
    else:
        inputstring = inputdata
    if (not self._isOpen):
        raise IOError(('Dummy_serial: Trying to write, but the port is not open. Given:' + repr(inputdata)))
    try:
        response = RESPONSES[inputstring]
    except:
        response = DEFAULT_RESPONSE
    self._waiting_data = response