Book Image

ArcPy and ArcGIS: Geospatial Analysis with Python

Book Image

ArcPy and ArcGIS: Geospatial Analysis with Python

Overview of this book

Table of Contents (19 chapters)
ArcPy and ArcGIS – Geospatial Analysis with Python
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 2. Configuring the Python Environment

In this chapter, we will configure both Python and our computer to work together to execute Python scripts. Path variables and environment variables will be configured to ensure that import statements work as expected, and that scripts run when they are clicked on. The structure of the Python folder will be discussed, as will the location of the ArcPy module within the ArcGIS folder structure. We will also discuss Integrated Development Environments (IDEs), programs designed to assist in code creation and code execution, and compare and contrast existing IDEs to determine what benefits each IDE can offer when scripting Python code.

This chapter will cover:

  • The location of the Python interpreter, and how it is called to execute a script

  • Adjusting the computer's environment variables to ensure correct code execution

  • Integrated Development Environments

  • Python's folder structure, with a focus on where modules are stored