I need to call Oracle Sql*Plus from a python script. If I put the call to sql*plus like this:
os.system('sqlplus /NOLOG @my_script')
Then the @my_script will never get passed. Even if I put the line inside callit.bat and do:
What happens is sqlplus starts but it does not execute the script. No amount of quoting helps.
It does always work like this :
However this opens another window and the python script resumes immediately. Using
os.system('start /wait callit.bat') works exactly (wrong) as os.system('callit.bat'). It does wait but sqlplus starts up with no knowledge of the script, which contains the connect string.
Any of you geniuses figure this one out?