subprocess pipe

Tim Harig usernet at
Sun Nov 14 20:47:55 CET 2010

On 2010-11-14, Camille Harang <mammique at> wrote:
> # pg_dump prompts for password so I inject it in stdin.
> pgsql.stdin.write('MY_PASSWORD' + '\n')

For security reasons, some programs use direct access to the TTY system
for password entry rather then reading from stdin.  Most of these programs
provide another access mechanism that can be used for authentication
(ie public keys or storing the password in a permission restricted
configuration file.

More information about the Python-list mailing list