emmanuel added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14916>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to