[#46836025] Python 3x compat (str/bytes)

Python 3x requires that the subprocess input must be a bytes/buffer object,
not a plain string. Raises the following exception

    TypeError: 'str' does not support the buffer interface