Frawley: Chapter 2 Notes

Chapter 2 Notes:

The autocomplete feature allows you to not need to memorize all function/statement diction and their uses.  Explains different IDEs and their uses. How to use the python window in Arc. Explains which tools are used with the help of python for specific geoprocessing tasks. 

Quick and easy to read. Probably only took around 25 minutes. The chapter review questions are the following: 

 

What does IDE stand for? 

Integrated Development Environment.

 

What does it mean that python is an interpreted language? 

Interpreted language means that it doesn’t need to compile into binary before the script runs. 

 

Which python editor comes installed with every version of python? 

Command prompt, or IDLE (Integrated DeveLopment Environment)

 

What are some of the recommended python editors to work with ArcGIS Pro 

PyCharm, Spyder, Visual Studio

 

What are some of the differences and similarities between python editors? 

Essentially they’re similar in every aspect except Spyder is more well supported with geospatial programming and visualization. 

 

What are the general steps to install and configure each of the python editors? 

Download the python language from their website, decide which IDE you want to work with and go to their website and download the version for your operating system. Once you download the IDE of choice, follow the setup instructions and begin writing your code. I also recommend giving a designated folder to keep each python project organized and by itself. 

 

What is the default environment when working with python and ArcGIS Pro 

IDLE 

 

What is syntax highlighting? 

Syntax highlighting assigns different colors to statements, functions, text, etc. 

 

What is a file extension for a python script file? 

.py 

 

How do you open the Python window in ArcGIS Pro? 

Click the toolbox at the top of ArcGIS Pro and click open the python window. 

 

What are the two sections of the python window, and what purpose does each one serve? 

The top is the transcript, and the bottom window is called the prompt. The transcript is blank until you start scripting in the prompt window. When you run the code in the prompt, it displays the script on the above transcript window. 

 

What are some typical examples of autocompletion prompts in the python window, and how do they assist in writing proper code? 

They reduce the amount of code you need to memorize since the list of autocomplete prompts provides the name of different functions and descriptions on how to use them. This results in fewer syntax errors and is faster than typing the full name of the function. 

 

Which features of the python window illustrate that it is fully integrated with the geoprocessing framework of ArcGIS Pro? 

Most of the geoprocessing framework and data extraction/management tools in ArcGIS Pro are written in Python 3, so you are able to manipulate default python tools within the software using the Python window. Within the python geoprocessing tools, you can manipulate the script to incorporate multiple layers or rasters at once, instead of individually.