Message185229
Kevin,
I now fully agree with you. Regarding points 2 & 3 I dismissed modifying sys.stdin/out in python out of hand because it still would not allow to have a proper behaviour with two concurrent consoles on the same interpreter. Anyway this is not a very meaningful use-case, so modifying sys.stdin/out looks like the best solution.
As for point 1, it can be worked around in a twisted and probably non-portable way (setting PyOS_ReadlineFunctionPointer to a custom function that forks a child which runs GNU readline or whatnot on its fds 0,1,2, and which communicates with the parent through pipes) but it's a pity that from PyOS_Readline() on, argument sys_stdin is correctly passed down, and that the chain has only this gap in tok_nextc() which dismisses the caller's argument and uses plain stdin.
If the user arguments are not used, why does PyRun_InteractiveLoop() take any arguments at all?
It would be nice to know the opinion of the python development team and to work out a complete fix (considering also stdout as you suggest) under their authority. |
|
Date |
User |
Action |
Args |
2013-03-25 20:21:41 | emmanuel | set | recipients:
+ emmanuel, vstinner, Kevin.Barry |
2013-03-25 20:21:41 | emmanuel | set | messageid: <1364242901.7.0.724916534946.issue14916@psf.upfronthosting.co.za> |
2013-03-25 20:21:41 | emmanuel | link | issue14916 messages |
2013-03-25 20:21:41 | emmanuel | create | |
|