469,898 Members | 1,586 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

proper way to use popen4

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

Jun 14 '06 #1
0 1093

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Patrick L. Nolan | last post: by
2 posts views Thread by Patrick L. Nolan | last post: by
1 post views Thread by Vivien Mallet | last post: by
reply views Thread by Jim | last post: by
reply views Thread by Roman Yakovenko | last post: by
reply views Thread by rinkworks | last post: by
4 posts views Thread by billie | last post: by
2 posts views Thread by Grant Edwards | last post: by
1 post views Thread by julian | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.