Copy database with python..

Martin Sand Christensen msc at es.aau.dk
Fri Nov 2 10:34:23 EDT 2007


>>>>> "Abandoned" == Abandoned  <besturk at gmail.com> writes:
Abandoned> Yes i understand thank you. Now i find that maybe help the
Abandoned> other users.

Abandoned> import os
Abandoned> os.system("su postgres")
Abandoned> ...

I get the distinct impression that you're trying to replace simple shell
scripting with Python. While it's possible, you're probably making
things much more complicated than they need to be. Unless you're
actually doing something with all that data of yours, don't use Python
where a simple shell script will be much smaller and cleaner.

Martin



More information about the Python-list mailing list