Question : Run External Program

How do I run an external program from a Python script?  I would like to run SQL*Plus...

Answer : Run External Program

You should probably write more details about what you want. Here the simple way...
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
import os
 
...
os.system('the command to be launched as done from command line')
 
 
# Or newer approach using the subprocess module (here the helper function to
# make it simpler).
import subprocess
...
retcode = subprocess.call('command arg', shell=True)
Open in New Window Select All
Random Solutions  
 
programming4us programming4us