forked from bartvdbraak/blender
Exppython:
- Adding argv to the builtin sys Python module: Currently only argv[0] is there. This fixes a weird error that can make correct scripts fail.
This commit is contained in:
parent
3295b394b6
commit
2289f3abb6
@ -190,6 +190,8 @@ void init_syspath(void)
|
||||
if (mod) {
|
||||
d = PyModule_GetDict(mod); /* borrowed ref */
|
||||
PyDict_SetItemString(d, "executable", Py_BuildValue("s", bprogname));
|
||||
/* in the future this can be extended to have more argv's if needed: */
|
||||
PyDict_SetItemString(d, "argv", Py_BuildValue("[s]", bprogname));
|
||||
Py_DECREF(mod);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user