Re: python + postgres psql + os.popen

2006-06-23 Thread damacy
hi, there. thanks for the help. now i have a different problem now. i decided to use 'subprocess' and 'Popen' objects instead of 'os.popen()' function, which i believe do not make much difference. my code is like the following... [1] link = subprocess.Popen(command, stdin = subprocess.PIPE, stdo

Re: python + postgres psql + os.popen

2006-06-23 Thread damacy
hi, there. thanks for the help. now i have a different problem now. i decided to use 'subprocess' and 'Popen' objects instead of 'os.popen()' function, which i believe do not make much difference. my code is like the following... [1] link = subprocess.Popen(command, stdin = subprocess.PIPE, stdo

Re: python + postgres psql + os.popen

2006-06-22 Thread Simon Forman
damacy wrote: > hello, everyone. ... > this works well. however, it does not show me any warning nor error > messages if there is one. for example, i am trying to create a table > which already exists in the database, it should show me a warning/error > message saying there already is one present i

Re: python + postgres psql + os.popen

2006-06-22 Thread Bruno Desthuilliers
damacy wrote: > hello, everyone. > > i am trying to write a program which executes SQL commands stored in > .sql files. > > i wrote a function called psql() whose contents look like the > following. > > ... > os.popen(command) > file = os.popen(command, 'w') > file.write(password) > file.close()

Re: python + postgres psql + os.popen

2006-06-22 Thread Laszlo Nagy
damacy írta: > hello, everyone. > > i am trying to write a program which executes SQL commands stored in > .sql files. > > i wrote a function called psql() whose contents look like the > following. > > ... > os.popen(command) > file = os.popen(command, 'w') > file.write(password) > file.close() > .