Vielleicht oder wahrscheinlich gehts in C sowieso leicher, aber wie ginge der Aufruf in Python?
Code: Alles auswählen
PyRun_SimpleString("import os; return os.getcwd()");
Code: Alles auswählen
PyRun_SimpleString("import os; return os.getcwd()");
Code: Alles auswählen
PyObject* modul = PyImport_ImportModule("os");
PyObject* function = PyObject_GetAttrString(modul, "getcwd");
PyObject* directory = PyObject_CallObject(function, NULL);