Can't find the rest of the code but stdin can be treacherous. You may want to join a good site such as follows that digs into py. Link follows.
http://stackoverflow.com/questions/1450393/how-do-you-read-from-stdin-in-python
So I have a Python script which logs into a website and downloads a file. When I access the page and login, the script prompts me for a username and password. I decided to write a batch file that would send the input I need from a text file.
The batch file is simple:
@echo off
myScript.py < inputFile.txt
This successfully enters the username (which is on the first line of the txt file), but when the password prompt shows up, it doesn't enter the password. I tried a similar batch file with a simpler script that asked for two inputs, and it worked fine, so it appears it may have something to do with the fact that it's a password. Would this make sense? And how should I go about fixing this?

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic