proper way to use popen4

micklee74 at hotmail.com micklee74 at hotmail.com
Tue Jun 13 23:42:51 EDT 2006


hi
i have to execute some SQL statements against a database using a SQL
client
i want to use the os.popen4 module
can someone correct the way i use os.popen4?
thanks

fin = "select * from some_table" #sql statement
client = "osql server user password" #sql client syntax
fin, fout = os.popen4(client)
fin.close()  <--- i need to close the stdin first right?
print fout.read()

I get no results when i did the above...
thanks




More information about the Python-list mailing list