my task is to execute multiple buffers with the list-loop!
import arcpy
arcpy.env.overwriteOutput = 1
arcpy.env.workspace="C:\\salzburg.gdb"
sbgRivers="sbg_rivers"
buff_name=raw_input("Please insert a file name:")
for buffer_size in [100,200,300,450]:
outfile="C:\\salzburg.gdb\\buffer_output"
arcpy.Buffer_analysis(sbgRivers,buff_name+str(buffer_size),buffer_size)
print "Buffer ready"
So the next step is: If the file name already exists(raw_input), the user is asked to enter a new data set name until a name is found, which doesn´t exist yet!
I thought about a while loop, but i´m not sure how to integrate it in the code above
while arcpy.Exists(buff_name)==True:
buff_name=raw_input("Please enter a new data set name")
else:
for buffer_size in [100,200,300,450]:
outfile:....
arcPyBuffer_analysis(....)
Any help is welcome and really appreciated!