Reading From stdin After Command Line Redirection

Chris Angelico rosuav at gmail.com
Wed Oct 23 18:23:57 EDT 2013


On Thu, Oct 24, 2013 at 9:20 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
> random832 at fastmail.us writes:
>
>> On Wed, Oct 23, 2013, at 16:52, Chris Angelico wrote:
>> > There are times when this is correct behaviour - like asking for
>> > passwords (SSH and sudo work like this).
>>
>> Less (or pagers generally, or an interactive text editor that allows
>> creating a file from standard input) would be another example of a
>> program where it makes sense to do this.
>
> You're both describing programs that read the console, which is not what
> the OP was asking for. The OP was asking about re-opening stdin after
> reaching EOF, which is incoherent as far as I understand it.
>
> I'm still waiting for the OP to clarify what they want to do.

The OP did say "tty" and mentioned getpass.

ChrisA



More information about the Python-list mailing list