Calling Python from Symbian C++
1 2 CSPyInterpreter* it = CSPyInterpreter::NewInterpreterL(); 3 CleanupStack::PushL(it); 4 PyEval_RestoreThread(PYTHON_TLS->thread_state); 5 6 PyRun_SimpleString("open(r'c:\\foo.txt', 'w').write('hello')\n"); 7 8 PyEval_SaveThread(); 9 CleanupStack::PopAndDestroy(it);
From Nokia Forum