Which IDE should I choose for Python development for ArcGIS?

A bit of history…

I have started writing Python scripts in 2011 and my first IDE was PyScripter. I quite liked it first because this is so much better than Notepad… but after some time I realized that I get frustrated over some things such as inability to keep working on my code while the debug process was running and crashes that happened now and then. Some other useful features I was using in Visual Studio were not available either.

Choosing an IDE for Python might be hard especially if you haven’t used any earlier. However, I heard that Wing IDE is being used in Esri by quite a few Python developers. So, I switched to Wing IDE in 2014 and really liked it from the very beginning; it has a very clean UI and it is very easy to customize its appearance.

The intellisense (or code autocompletion) is working fine and I get most of my arcpy module objects in the suggestions. Some classes such as arcpy.da are implemented with CPython with no Python source wrapping it, IDEs cannot get the autocompletion for this one. However, while working with arcpy I got all the autocompletion I really need. It is very easy to switch what Python interpreter should be used for a certain file or a project (32-bit Python will fail to process large datasets; after choosing 64-bit Python if you have it installed as your Python executable you will be able to handle large GIS data with no problem provided that you have enough RAM on your machine. I’ve done some routing data (many GBs) processing and Python process was eating up around 12GB of RAM.)

Organizing your projects will be way easier because you can add many other files of other formats, such as SQL or HTML. Wing provides a great way to organize your datasets, documentation, and the code. It is capable of finding differences between two Python files in interactive mode. This is something you will definitely want to use when comparing several versions of the same file or a script you were working on.

As you see, it has many useful features which makes coding a lot more efficient and in fact pleasant. Here are some of them I use all the time:

Wing Source browser

wing_sourceThe PyScripter also has a similar window called Code Explorer but it is not as robust as the Wing’s Source Browser. I could build a very nice function calls tree using the Wing while working with some large Python module I’ve inherited. You can go to the place in the code where an object was used. This can be really helpful when refactoring some legacy code or when trying to build reference materials for yourself or peer developers.

Wing Debug probe

I use this window when writing new code and trying to find a bug in existing one. I usually run the program until the very end leaving a couple of clean-up rows, then fire up the Debug Probe and start working forward. Because your code is evaluated on-the-fly, there is no need to re-start the whole debugging process re-running the Python file.

wing_probeBecause the workflow you might work with can be executed on some large datasets, it will be very efficient not to run the program too often. After I’ve verified that the code I wrote is correct, I copy-paste it in the Python file. You can also run just a portion of your code in the Debug probe, which can be very useful for evaluating just a few rows.

You bring up the Debug Probe and press the + icon in top right near the Options menu to lock a range of lines into being the Active Range, which you can then execute by pressing the cog icon that appears in the shell.

Wing Source assistant

wing_assistUsing Wing, I found that I don’t go to the ArcGIS Help that often as I did when I was using PyScripter. Wing provides an interactive way to get the syntax and usage tips for a function or a class you use in any imported module. As you type the name of the tool, the Source Assistant window gets updated and you can see all the information about this tool. So, all the GP tool’s help with the input parameters and valid options are available right in the IDE window.

Some other key points
  • It is not expensive. This is reasonable price for a very good piece of software.
  • Wingware provides me with excellent and fast support. Always helpful and prompt.
  • It is very easy to authorize the software offline without any hustle. It is just about copying/pasting the license code. You are allowed to install the Wing you purchase on multiple machines, read more about licensing terms here.
  • The company trusts their users. You can just install it on a new laptop you get or on virtual machine you do your coding using the same license you have. When your license expires, the Wing will run for 10 minutes at a time without any license or activation at all, or a trial license period can be used until any license problem is resolved.
  • Wing has UI that just works. It starts fast, it has easy to navigate panels and popups. The software was always responsive and never crashed since I’ve started using it last year.

Come on, go and get yourself the Wings to fly and code like a pro!

Advertisements

One thought on “Which IDE should I choose for Python development for ArcGIS?

  1. Nice article, one suggestion, point out where to find Source Browser and Source Assistant. If someone has pressed F2, they might have hidden them. And the Tools menu has a lot of items…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s