On Thu, Oct 24, 2013 at 4:25 AM, Tim Daneliuk <tun...@tundraware.com> wrote: > I have a program that runs like this: > > foo.py <inputfile > > I want to reconnect stdin to the tty as usual after 'inputfile' > has been read so that things like raw_input and getpass > will work as expected. > > So, after I do .... = sys.stdin.readlines(), how to I reopen > stdin in its nonredirected mode?
You fundamentally can't reopen "stdin", as that will just be your input file. What you want to do is open the console (TTY) itself. What platform are you on? ChrisA -- https://mail.python.org/mailman/listinfo/python-list