Python Examples

Login to reply to this topic.
Thu, 2005-12-01 11:21
Joined: 2005-04-01
Forum posts: 118
hi symbians

check this link to get more python scripts

http://www.bigbold.com/snippets/tag/series60

Prashant {prashu}


Fri, 2005-12-02 16:24
Joined: 2005-09-09
Forum posts: 20
Re: Python Examples
i tried the foll example with some modification(calling python from symbian c+) from the link u gave above:--

CSPyInterpreter* it = CSPyInterpreter::NewInterpreterL();
CleanupStack::PushL(it);
PyEval_RestoreThread(PYTHON_TLS->thread_state);

PyRun_SimpleString("from time import time,ctime\n"
                     "print 'Today is',ctime(time())\n");

PyEval_SaveThread();
CleanupStack::PopAndDestroy(it);

App is being closed by the OS.  If instead of printing date and time i write this to a file it works well.

so i guess it is due to the "print"    statement. Please help me if you are able to run it.


Abhinav
  • Login to reply to this topic.