Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to - Run SQLPlus and script in Python ?

410266Jul 8 2010 — edited Jan 5 2011
I want to have Python run command like this (on Windows) - and wait for completion

"sqlplus.exe myname/mypw@proddb @C:\Temp\test.sql"

commands module does not seem to work,
and subprocess module just launches sqlplus.


How have you done this ?

thanks



edit: I added the "r" pre-pend and this works: subprocess.call(r'sqlplus.exe myname/mypw@proddb @C:\Temp\test.sql', shell=False)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 2 2011
Added on Jul 8 2010
1 comment
6,942 views