leif walsh rbvovwa8gmailcom sun feb 24 2008 102 pm shaya potter wrote please cc responses wondering getpass could changed enable piped stdin work instance getmail program read email password via stdin using getpass functionality however echo password getmail4 fail due stdin terminal therefore able old termiostcgetattrfd tell point prevent echoing password isnt problem echo case give especially using bash wont even cmdline run script builtin script also read password store memory currently code def unix_getpasspromptpassword prompt password echo turned restore terminal settings end try fd sysstdinfileno except return default_getpassprompt old termiostcgetattrfd copy save new old new3 new3 termiosecho 3 lflags try termiostcsetattrfd termiostcsadrain new passwd _raw_inputprompt finally termiostcsetattrfd termiostcsadrain old sysstdoutwriten return passwd would seem tcgetattr line moved initial try echo case would work expected would fail caught run default_getpass read stdin reason way certainly possible getpass read stdin automatically traditionally understood read tty much much better suppose program meant use getpass read file stdin sudden miss first line file becomes password particular reason getpass works way working way c decades really want maintain configuration file password available command line try adding option like p p whatever program youre writing cheers leif _______________________________________________ pythondev mailing list zvlllneumpythonorg httpmailpythonorgmailmanlistinfopythondev unsubscribe httpmailpythonorgmailmanoptionspythondevpythondev40tangomucom tue 05 aug 2008 220152 0500 pythondev getpass stdin