a similar question has been asked before, but the answers suggested a workaround which is not applicable to my situation.
An email message is piped from mutt to a script, and is read from STDIN:
message = sys.stdin.read()
# message is parsed and URLs are printed as a list to choose from...
selected_index = raw_input('Which URL to open?')
I understand that raw_input() will get the EOF left by read(), but is there a way to 'reset' STDIN?
./script.py < messageproduces the problem described above.