You can execute python code from Symbian C++ application ! Here's an simple example :
CSPyInterpreter* it = CSPyInterpreter::NewInterpreterL();
CleanupStack::PushL(it);
PyEval_RestoreThread(PYTHON_TLS->thread_state);
PyRun_SimpleString("open(r'c:\\foo.txt', 'w').write('hello')\n");
PyEval_SaveThread();
CleanupStack::PopAndDestroy(it);
No comments:
Post a Comment