# bufferTry.py
# Purpose: Buffer the input dataset.
# Usage: fullpath_filename output_directory
# Test input1: C:/gispy/data/ch14/bogus.shp C:/gispy/scratch
# Test input2: C:/gispy/data/ch14/bogus.shp 
import arcpy, sys, os
arcpy.env.overwriteOutput = True
try:
    inFile = sys.argv[1]
    outDir = sys.argv[2]
    inFileName = os.path.splitext(os.path.basename(inFile))[0]
    buffer = outDir + '/' + inFileName + 'Buff.shp'
    arcpy.Buffer_analysis(inFile, buffer, '1 mile')
    print('{0} created.'.format(buffer))
except arcpy.ExecuteError:
    print(arcpy.GetMessages())
except IndexError:
    print('Usage: <fullpath_filename output_directory>')
