From: Тихомиров В. <int...@ya...> - 2017-05-01 17:27:22
|
<div>I tried interactive. It works in place of standard interpreter but its interrupt(Py.getThreadState()) does nothing. The program keeps running after it.</div><div> </div><div>-------- Пересылаемое сообщение --------</div><div>01.05.2017, 19:39, "Stefan Richthofer" <ste...@gm...>:</div><div> </div><div>Did you try to create a http://www.jython.org/javadoc/org/python/util/InteractiveInterpreter.html instead? (It's a subclass of PythonInterpreter, so features all of its methods too.) Then you can call interrupt on it, e.g. interrupt(Py.getThreadState()).</div><div>(Disclaimer: Didn't try myself, so no idea if this works as expected.)</div><div> </div><div>Best</div><div> </div><div>-Stefan</div><div> </div><div>> Gesendet: Montag, 01. Mai 2017 um 16:31 Uhr</div><div>> Von: "Тихомиров Валентин" <int...@ya...></div><div>> An: jyt...@li...</div><div>> Betreff: [Jython-users] Can I cancel Pythoninterpreter's evaluation?</div><div>></div><div>> I use some http://www.jython.org/javadoc/org/python/util/PythonInterpreter.html. It has methods to evaluate a script. What do you do for preliminary termination of the execution?</div><div>></div><div>> ------------------------------------------------------------------------------</div><div>> Check out the vibrant tech community on one of the world's most</div><div>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot</div><div>> _______________________________________________</div><div>> Jython-users mailing list</div><div>> Jyt...@li...</div><div>> https://lists.sourceforge.net/lists/listinfo/jython-users</div><div>-------- Конец пересылаемого сообщения --------</div> |