On Mon, 07 Jul 2014 14:49:56 -0400, Terry Reedy wrote: > Avoid EOFError. Much better, I think, is the somewhat customary > > s = input("Enter something, or hit <return> to exit") if not s: > sys.exit() > else: <process s>
Under many circumstances, I would do exactly that. But sometimes an empty string is valid data, not a signal for special processing (whether exiting the application, or something else). -- Steven -- https://mail.python.org/mailman/listinfo/python-list