title: Debugging an external System command in Python
body: <pre><code>#!/usr/bin/python
  
  
  
  def copyPatchTempToPatchStage(destinationLoction):
  
   command='/usr/bin/python '+destinationLoction+'/PatchGen.py '
   print command
   executeCommand(command)
  
  
  
  
  def executeCommand(command):
  
   p_output=subprocess.Popen(command, stdout=subprocess.PIPE, shell=True)
   p_output.communicate()
   p_output.wait()
  
  
  if __name__ == '__main__':
  
   destinationLoction="/scratch/app/product/fmw/obpinstall/patching/patchGenerationPath/2015-12-28/T14_OPATCH/100005135/PATCH_TEMP"
   copyPatchTempToPatchStage(destinationLoction)
  </code></pre>
  
  <p>Now while debbuging the python file it does not enters the PatchGen.py </p>
  
  <p>Is there any way to debug System commands</p>