DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Calling Python From Symbian C++

09.07.2005
| 2346 views |
  • submit to reddit
        
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);
From <a href=http://discussion.forum.nokia.com/forum/showthread.php?t=55828>Nokia Forum</a>