ArcGIS Pro is coming with a totally redesigned UI, and the Python window is no exception.
First off: the Python window is meant to be a utility. It’s not most flashy of designs. You type in code and get feedback, it should help you do that and that is all. Our intention in the redesign wasn’t to get people super excited about typing code into a text box, it was to pleasantly surprise you with some helpful features and get out of your way.
The way it’s set up it a little different in Pro App. Here’s a quick tour of its design and features.
There are separate places for input and output
The biggest obvious change in the Python window is that it’s been divided into two pieces: the input section and the transcript section. We found from a usability point of view, mixing the input and output sections into one control could be confusing. You don’t have to skim the entire window to find where the newest prompt is, you just click in the bottom and start typing. It’s similar to a few other user interfaces we’ve used, old and new:
If you’re typing inside of a function call, you’ll get a list of parameters along with the current parameter highlighted:
We’re not blazing any new territory here, it’s just useful.
This is a carryover from every Python window ever, including the ArcGIS 10.X Python window. The Python window will try to guess what you’re looking for:
it works a little harder than most Python auto-completes and will let you even just type the first letter or two of something:
that’ll save a few keystrokes. And like the 10.X Python window, it gives extra help for geoprocessing tools:
Tools Show Up in History
Any GP tool you run in the Python window will show up in your current project’s Geoprocessing History. Outputs will be added to the current map.
When the Python interpreter is running, the Python input section is disabled and will show a “running” progressor. You can stop anything running in the Python window by hitting the “X” when it’s visible:
History Across Sessions
You can use [Ctrl-Up] and [Ctrl-Down] to go through previous commands you’ve issued in the Python window. It also saves them between sessions, so if you open up a new ArcGIS Pro instance, you can hit [Ctrl-Up] and get what you typed last time.
Drag And Drop
You can drag and drop pretty much anything into the Python window and it’ll try to guess what you want:
and Geoprocessing tools:
tools you’ve already run in the history show up as full Python snippets:
from Windows Explorer:
Comfortable And Productive
We can’t show this in screenshots, but a lot of the work we’ve put into the Python window is how it feels. Hopefully you’ll be more productive and the Python window will get out of the way and just let you do your job, speeding you up where it makes sense.