I'm running Arc 10.2 for Desktop with Python 2.7 installed at C:\Python27\ArcGIS10.2 (I also have Py Ver 3 as well).

Can someone enlighten me in a few words on difference between, say, arcpy.analysis.Buffer and arcpy.Buffer_analysis and where the applicable scripts reside and how they work.

I've found the analysis.py script at Program Files\ArcGIS\Desktop10.2\arcpy\arcpy\Geoprocessing which contains the Buffer class within the script and this would run. I assume this essentially sits behind the ArcToolbox\Analysis\Proximity\Buffer tool.

However the Buffer_analysis also comes up as an option when I type but cannot find where this sits. I know sometimes different versions of the programs have changes.

2 Answers 2


You can call the GP tools in two ways:




Both are calling the same function, so there is no difference. It is a matter of taste; I always call functions in the arcpy.Buffer_analysis format because I seem to read the name tool faster in this way (I see first the toolname, and often seeing the toolbox is irrelevant).

I believe this naming convention was necessary to introduce because there are a couple of GP tools that have the same name, but are located in different toolboxes (classical example is Clip (Analysis) and Clip (Data Management).

Find the convention you like most and then stay consistent throughout your code by using just one naming format.

  • Thanks Alex, Yep looking in the script for Buffer I see Buffer_analysis mentioned. Arc's habit of having same names in different locations is a bit confusing at first.
    – DirkB
    Jul 3, 2014 at 0:22

As you suspect arcpy.analysis.Buffer and arcpy.Buffer_analysis are two equivalent ways to run the same tool.

  • Thanks PolyGeo, just getting the hang of this. I assumed that it would be one rather than having two different ways to do the same thing; can be confusing when starting out.
    – DirkB
    Jul 3, 2014 at 0:25
  • @DirkB No problem - the first time I saw arcpy.analysis.Buffer syntax used was in an answer by Blah238 and I tried to correct his "mistake".
    – PolyGeo
    Jul 3, 2014 at 0:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.