is used for function parameter transfer, so PyObject_GetAttrString cannot be used
PyByteArray_FromStringAndSize or Py_BuildValue first converts char * into bytesThen PyTuple_SetItem converts bytes into tuple
PyObject * bytesObject = PyByteArray_FromStringAndSize(message, len); PyObject * buildObject = Py_BuildValue("y#", message,len); PyObject * argsObject = PyTuple_New(1); PyTuple_SetItem(argsObject, 0, bytesObject);
PyByteArray_FromStringAndSize or Py_BuildValue first converts char * into bytes
Then PyTuple_SetItem converts bytes into tuple