proper way to use popen4

M

micklee74

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top