Message186553
> • interactive console doesn't use sys.stdin for input, why?
Modules/main.c calls PyRun_AnyFileFlags(stdin, "<stdin>", ...). At this point, sys.stdin *is* the same as C stdin by construction, so I'm not sure how you came to encounter the issue.
However, it's also true that if you later redirect sys.stdin, it will be ignored and the original C stdin (as passed to PyRun_InteractiveLoopFlags) will continue to be used. On the other hand, the input() implementation has dedicated logic to find out whether sys.stdin is the same as C stdin.
(by the way, the issue should also apply to 2.7)
> • it uses sys.stdin.encoding, shouldn't it rather use sys.__stdin__.encoding if anything?
Assuming the previous bug gets fixed, then no :-) |
|
Date |
User |
Action |
Args |
2013-04-11 09:56:37 | pitrou | set | recipients:
+ pitrou, brett.cannon, georg.brandl, ncoghlan, vstinner, benjamin.peterson, eric.araujo, tshepang, Drekin |
2013-04-11 09:56:36 | pitrou | set | messageid: <1365674196.94.0.957957114218.issue17620@psf.upfronthosting.co.za> |
2013-04-11 09:56:36 | pitrou | link | issue17620 messages |
2013-04-11 09:56:36 | pitrou | create | |
|