title: calling shell script from python where shell connects to database
body: <p>I want to call shell script from python code. The shell script which I am trying to call is having multiple database (DB2) call in it; means it connects to DB2 database multiple times and execute different database sqls. I tried using subprocess.call method like (<code>subprocess.call(['./&lt;shell script with full path&gt;'])</code>); but it seems before the script connects to database and executes the commands mentioned within the script, it is terminating. But when I am calling the shell script as a standalone script from command line, then it is working good.</p>
  
  <p>Is there any other way this can be handled?</p>