20

I have been scripting in Python for ArcGIS 10, and so far I have just been using Notepad++.

I like how the Python command line interface code-completes arcpy functionality for you, showing you your options, and I was wondering if there is a way to add this feature to an external editor.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jul 30, 2010 at 17:59

7 Answers 7

15

PyScripter is my choice. It's free and open source and a lightweight and quick install. There is even a registry-free installation that doesn't require admin rights for installation.

Chad Cooper
12.8k4 gold badges48 silver badges87 bronze badges
answered Dec 3, 2010 at 17:24
4
  • 4
    Code completion seems to work for the Arc10 arcpy module, but I was not able to enable it for Arc 9.x. For future readers, to enable arcpy (Arc10) code-completion in PyScripter, go to Tools--> Options--> IDE Options--> and add "arcpy" to the "special packages" line of Code Completion section. NOTE: code-completion is case sensitive, so arcpy.copyfeatures will not code-complete, but arcpy.CopyFeatures will code-complete (note the capital "C" and "F". Commented Sep 23, 2011 at 15:31
  • 2
    An additional note on code completion... you can disable case sensitivity by unchecking "case sensitive" in the same location as noted above. Commented Jan 19, 2012 at 17:04
  • Also, the Ctrl-Shift-Space hotkey will bring up the code completion "call tip" if you are for example in the middle of writing a function parameter list and you did something to close it. Commented Feb 17, 2013 at 19:57
  • The question is about autocompletion of ArcPy but your "answer" makes no mention of it. Please address this ASAP, because it is currently at risk of being deleted. Commented Jan 25, 2017 at 8:00
9

I recommend WingWare IDE. It seems to have the best debugging and code completion out of the Python IDEs I've seen. One of the motivating factors for arcpy in 10.0 was that it would have better code completion than arcgisscripting offered.

answered Jul 31, 2010 at 19:35
8

MS recently released Python Tools for Visual Studio - once you follow a few steps outlined here: http://blog.guerrillagis.net/?p=878 Visual Studio will provide you with intellisense, method signatures, syntax highlighting, a REPL and a debugger.

RyanKDalton
23.3k19 gold badges114 silver badges180 bronze badges
answered Jun 3, 2011 at 16:50
2
  • 1
    +1! Visual Studio 2010 with PyTools is a fantastic Python IDE. It even integrates with the Visual Studio Integrated Shell for a completely free setup even without any existing Microsoft licenses. Commented Jun 3, 2011 at 16:59
  • I use Python Tools for Visual Studio too - moved here from PythonWin several years ago and have never gone back Commented Apr 16, 2016 at 2:34
7

I'd try Eclipse using the Pydev extensions. I know it didn't do code completion very well with the python geoprocessor in 9.3, and I haven't got 10 to play around with yet, but even without it, it is a much nicer editor with some very cool features.

blah238
35.9k8 gold badges97 silver badges204 bronze badges
answered Jul 31, 2010 at 4:42
1
  • 1
    Have finally got down to playing with 10 - code complete does work w. Eclipse. Good luck to anyone else trying it out! Commented Oct 16, 2010 at 14:38
5

Code completion is a feature of the editor, this stackoverflow post has a listing of editors which support code completion. In Notepad++, you can enable autocompletion as a preference.

answered Jul 30, 2010 at 18:56
1
  • 1
    Thanks, that was really helpful. I have autocompletion enabled, but it is only completing core python code. Is it possible to have it autocomplete arcpy functions? Thanks for the help, I am fairly new to this. Commented Jul 30, 2010 at 19:28
3

It seems to be poorly known that IDLE supports autocompletion reliably too.

If you are using it with ArcPy always run the import arcpy part of the script once so that your script window becomes aware of that site-package.

However, if you do not see autocompletion kick in then the trick is to use "Ctrl + Spacebar" to trigger it.

I have seen this mentioned here at Getting ArcPy autocomplete to work in IDLE? and on StackOverflow at Python IDLE. Auto-complete/Show completions not working but it is no doubt in the IDLE documentation somewhere too.

answered May 1, 2014 at 22:30
1

Active State komodo works fine for me. I just added a reference to the arcpy directory in the preferences. It has good debugging and a good interface. Autocompletion works for arcpy and my own libraries.

RyanKDalton
23.3k19 gold badges114 silver badges180 bronze badges
answered Jan 27, 2012 at 3:01
1
  • Hi Neil, can you better describe how? Im trying to add it on preferences as described but not having luck finding the .xml for code intelli inside arcpy folder. Commented May 13, 2013 at 22:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.