Garry Saddington <garry@xxxxxxxxxxxxxxxxxxxx> writes: >> import os >> os.popen("c:/scholarpack/postgres/bin/pg_dump scholarpack > >> c:/scholarpack/ancillary/scholarpack.sql") > scholarpack but no OS user scholarpack, but why should it create a file > then not fill the contents? Because that's exactly what will happen if pg_dump fails. The shell creates the empty output file and then tries to run the program. If program fails before sending anything to the output file, that's what you're left with. The real problem with this script is it's not even considering the possibility of program failure --- it's not checking for an error exit code, much less ensuring that error messages go someplace where you could look at them to find out what the problem is. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general