#NEWLINE# def main( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# env . overwriteOutput = True #NEWLINE# rr = RangeRingUtils . rangeRingsFromInterval ( inputCenterFeatures , inputNumberOfRings , inputDistanceBetween , inputDistanceUnits , inputNumberOfRadials , outputRingFeatures , outputRadialFeatures , optionalSpatialReference ) #NEWLINE# arcpy . SetParameter ( 5 , rr [ 0 ] ) #NEWLINE# arcpy . SetParameter ( 6 , rr [ 1 ] ) #NEWLINE# #UNINDENT# except arcpy . ExecuteError : #NEWLINE# #INDENT# msgs = arcpy . GetMessages ( ) #NEWLINE# arcpy . AddError ( msgs ) #NEWLINE# print ( msgs ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# tb = sys . exc_info ( ) [ 2 ] #NEWLINE# tbinfo = traceback . format_tb ( tb ) [ 0 ] #NEWLINE# pymsg = ( ( ( 'PYTHON ERRORS:\nTraceback info:\n' + tbinfo ) + '\nError Info:\n' ) + str ( sys . exc_info ( ) [ 1 ] ) ) #NEWLINE# msgs = ( ( 'ArcPy ERRORS:\n' + arcpy . GetMessages ( ) ) + '\n' ) #NEWLINE# arcpy . AddError ( pymsg ) #NEWLINE# arcpy . AddError ( msgs ) #NEWLINE# print ( ( pymsg + '\n' ) ) #NEWLINE# print ( msgs ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# if ( ( debug == False ) and ( len ( deleteme ) > 0 ) ) : #NEWLINE# #INDENT# if ( debug == True ) : #NEWLINE# #INDENT# arcpy . AddMessage ( 'Removing intermediate datasets...' ) #NEWLINE# #UNINDENT# for i in deleteme : #NEWLINE# #INDENT# if ( debug == True ) : #NEWLINE# #INDENT# arcpy . AddMessage ( ( 'Removing: ' + str ( i ) ) ) #NEWLINE# #UNINDENT# arcpy . Delete_management ( i ) #NEWLINE# #UNINDENT# if ( debug == True ) : #NEWLINE# #INDENT# arcpy . AddMessage ( 'Done' )