postgres backup script and popen2

Gabriel Genellina gagsl-py at yahoo.com.ar
Thu Feb 8 12:18:26 EST 2007


On 8 feb, 13:29, Jean-Paul Calderone <exar... at divmod.com> wrote:
> On 8 Feb 2007 08:23:49 -0800, Gabriel Genellina <gagsl... at yahoo.com.ar> wrote:
> >On 8 feb, 10:27, Maël Benjamin Mettler <m... at mediamonger.ch> wrote:
> >> flupke schrieb:
> >> > i made a backup script to backup my postgres database.
> >> > Problem is that it prompts for a password. It thought i
> >> > could solve this by using popen2.
>
> >> Use pexpect:http://pexpect.sourceforge.net/
>
> >pexpect could work. But a better way would be to supply the password
> >on the command line.
>
> So that it shows up in `ps' output to anyone on the system? :)

Any solution has pros and cons... having the password in the source
code is not so good anyway...

--
Gabriel Genellina




More information about the Python-list mailing list