This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author emmanuel
Recipients Kevin.Barry, emmanuel, vstinner
Date 2013-03-25.20:21:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1364242901.7.0.724916534946.issue14916@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-03-25 20:21:41emmanuelsetrecipients: + emmanuel, vstinner, Kevin.Barry
2013-03-25 20:21:41emmanuelsetmessageid: <1364242901.7.0.724916534946.issue14916@psf.upfronthosting.co.za>
2013-03-25 20:21:41emmanuellinkissue14916 messages
2013-03-25 20:21:41emmanuelcreate