The ArcGIS Pro Python window
Click on the Analysis
tab at the top of the ribbon and choose the Python
option:

You should see the Python
window appear at the bottom of the interface:

There are two regions of the Python window; they are called P
ython Prompt and Transcript. In the following figure, you can see each region if we pass a print
function:

You should notice how the print
function is slightly different here from its appearance in Python 2.7. In Python 3, instead of typing print "hello world"
, you have to pass the string to a print function, for example, print("hello world")
. This is one of the differences between Python 2 and Python 3, which we will cover in more detail in the following section.
Let’s look at how else we can use the Python window in ArcGIS Pro. In your instance of Pro, add the Bus_Stops
feature class from our working geodatabase. Then, in the Python window, type the following:
fields = arcpy.ListFields()
The following screenshot represents the previous code implemented in...