I can't find relevant information about this. For lua, if you want to execute a test.lua file from the main() C function, you call lua_dofile("test.lua").
What is the python equivalent?
2 Answers
If you are embedding Python, use PyRun_SimpleFile:
FILE *fp = fopen("test.py", "r");
int ret = PyRun_SimpleFile(fp, "test.py");
if(ret < 0) {
/* exception occurred */
}