how to run os.execv() to run command pslq dbname < gen.command

Sonu patelkundan at gmail.com
Sat Aug 4 14:19:46 CEST 2007


hello all ,
i need to run psql from my py file,,
for that i am using : os.execv(path for psql ,['psql dbname <
gen.command'])
but its not working ..........

the  command wht i want to run from this py file is :>>>psql dbname <
gen.command

where gen.command file contain some command to create csv file from
database

\o temp.csv
\a
\f ,
select * from temp

if u have any idea plz help me,,




More information about the Python-list mailing list