[issue31603] Please add argument to override stdin/out/err in the input builtin
Wren Turkal added the comment: I'm not sure that I ever got a definitive issue, but I didn't have time to push it forward. I still think the idea has merit. I'd love to see it implemented, but I don't have the time to pursue it right now. Thanks, wt On Mon, Jan 17, 2022 at 10:23 AM Irit Katriel wrote: > > Irit Katriel added the comment: > > See also Issue1927. > > -- > nosy: +iritkatriel > > ___ > Python tracker > <https://bugs.python.org/issue31603> > ___ > -- ___ Python tracker <https://bugs.python.org/issue31603> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31603] Please add argument to override stdin/out/err in the input builtin
Wren Turkal added the comment: Added a PR to facilitate discussion on python-ideas. -- keywords: +patch pull_requests: +3798 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31603> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31603] Please add argument to override stdin/out/err in the input builtin
Wren Turkal added the comment: This might also allow simplification of the getpass.unix_getpass() logic. I am not 100% sure about that yet though. -- ___ Python tracker <https://bugs.python.org/issue31603> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31603] Please add argument to override stdin/out/err in the input builtin
New submission from Wren Turkal : I would really love to add a few params to input so that it's signature looked more like so: def input(prompt, /, *, fin=sys.stdin, fout=sys.stdout, ferr=sys.stderr): ... This would certainly make overriding the the files in specific calls to input easier. A reasonable use case is collecting a piece over /dev/tty explicitly so that a redirected stdin could be used to pipe data into a program while overriding using /dev/tty to collect some piece of data. Here's some code illustrating what I'd like: import sys sys.stdin.close() sys.stdin = open('/dev/null', 'r') with open('/dev/tty', 'r') as f: x = input('Name? ', fin=f) print(x) FWIW, I have actually already implemented this fully (including tests). I am just trying to see what I need to do to allow release since I am work on my employer's time. In the interest of getting feedback, does the signature provided above look sane? -- components: IO messages: 303103 nosy: wt priority: normal severity: normal status: open title: Please add argument to override stdin/out/err in the input builtin versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue31603> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31600] please allow association of google login with current account on bug tracker
New submission from Wren Turkal : I have a Google account. Unfortunately, I had a bugs.python.org account before using the Google auth. Now I cannot seem to attach my Google auth to this account. When I try to login with Google now, it just tells me that an account with my email address already exists. I hope this is a reasonable place to report bugs for the bug tracker. -- messages: 303097 nosy: wt priority: normal severity: normal status: open title: please allow association of google login with current account on bug tracker ___ Python tracker <https://bugs.python.org/issue31600> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com