Message12090
There are quite a few wrinkles here that this potentially irons out. E.g. if you run a script with the -i flag, you're supposed to end up in an interactive session, even if an exception is raised. This is clearly useful, and not what happens in Jython.
However, deeper difficulties are not so much about the structure of jython.run() itself as about the relationships amongst interpreter, thread and system states, which are somewhat different from CPython. It seems (Jython) PySystemState does the job of both (CPython) PyInterpreterState and the sys module, so initialize() doesn't create a distinct primary interpreter. Elsewhere we make a PythonInterpreter that looks a bit like (CPython) PyInterpreterState, but is also roughly equivalent to the PyRun_* C-API.
Mainly I had hoped to sort out the isatty/interactive muddle, avoiding isatty(fd) (to satisfy Java 9), and maybe fix #2525 and #2305 as a side effect. I'm getting there, but just copying CPython isn't really possible while we diverge in our lifecycle objects. I'm gradually finding a synthesis of the CPython main() and current Jython run(). |
|
Date |
User |
Action |
Args |
2018-08-27 06:47:43 | jeff.allen | set | messageid: <1535352463.31.0.56676864532.issue2686@psf.upfronthosting.co.za> |
2018-08-27 06:47:43 | jeff.allen | set | recipients:
+ jeff.allen, zyasoft |
2018-08-27 06:47:43 | jeff.allen | link | issue2686 messages |
2018-08-27 06:47:41 | jeff.allen | create | |
|