K
K
Kirill3122021-09-26 01:00:28
Python
Kirill312, 2021-09-26 01:00:28

I'm learning python to C integration and can't figure out what my mistake is. If it's not difficult, can you help?

Here is the type error code: PyNAme needs an identifier, although everything works here https://habr.com/ru/post/466181/ . If I put PyObject it says that PyObject cannot be converted to PyObject* . Maybe I didn't install something? Or is it due to the fact that I write in c++? Sorry for my incompetence!
}

void main()
{
  PyObject*
  python_init() {
    do {
      Py_Initialize();

      pName = PyUnicode_FromString("func");

      Py_Finalize();
    }
  }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2021-09-26
@GavriKos

If this is the whole code and this is C - then it is maximally wrong.
The method has no return value. The method in the method in with is not supported in my opinion. There is also no inclusion.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question