Re: popen2 psql

2005-05-03 Thread Mage
Klaus Alexander Seistrup wrote: >Mage wrote: > > > >>I tried to write a proxy script for "psql" command. I need some >>query log. I failed to read from the file object. >> >> > >The psql command is probably linked against readline; did you look >in the ~/.psql_history file? > > > Thank you

Re: popen2 psql

2005-05-02 Thread Klaus Alexander Seistrup
Mage wrote: > I tried to write a proxy script for "psql" command. I need some > query log. I failed to read from the file object. The psql command is probably linked against readline; did you look in the ~/.psql_history file? Cheers, -- Klaus Alexander Seistrup Magnetic Ink, Copenhagen, Denmar

popen2 psql

2005-05-02 Thread Mage
Hello, maybe my question is about linux and not about python. I tried to write a proxy script for "psql" command. I need some query log. I failed to read from the file object. I have tested: a,b = os.popen2('ls') for s in b.readlines(): print s, and: a,b = os.popen2('./pto.py') for