title: Having Trouble Writing Image Files with Python
body: <p>I am having a bit of trouble with writing image files to a folder on my PC. 
  As you can see in my script below, I have used os.path.expanduser because I intend to use send this script to another computer that will obviously not have the same filepath as my local pc. When I run this script, the gdal_calc runs properly, however, there is no output? Any ideas on how I could create an output file or what may be causing the image to disappear would be greatly appreciated.</p>
  
  <pre><code>#!/usr/bin/env bash
  
  import subprocess
  from subprocess import call
  import sys
  import os
  
  
  # Set constants
  # The pathway to the image files are nested within the '--outfile=' command
  
  inHVFile = os.path.expanduser('~\\Desktop\\Zeros\\ZerosHV-Test-3.img')
  outPlacement = os.path.expanduser('~\\Desktop\\newHVZeros.img')
  outVFile = '--outfile=outPlacement'
  outVFile_1 = '--outfile=outPlacement_1'
  inVHFile = os.path.expanduser('~\\Desktop\\Zeros\\ZerosVH-Test-3.img')
  outPlacement_1 = os.path.expanduser('~\\Desktop\\newVHZeros.img')
  
  
  
  subprocess.call([sys.executable, 'C:\\Program Files (x86)\\GDAL\\gdal_calc.py','-A', inHVFile, outVFile, '--calc=A+1'])
  
  subprocess.call([sys.executable, 'C:\\Program Files (x86)\\GDAL\\gdal_calc.py','-A', inVHFile, outVFile_1, '--calc=A+1'])
  </code></pre>