Python Primer

Free PDFs are available of the Python Primer for ArcGIS Workbooks. (See the links below). Even though these books reference ArcMap and Python 2.x syntax, the content and scripts are still valid and can be used with the newer ArcGIS Pro and Python 3.x syntax. The major difference between 2.x and 3.x syntax for the scripts are the print statements. The exception is the Mapping Module. Since ArcGIS Pro uses the Project and Map Tab/Map Layout structure, the initial Python scripting for the map module is a little syntactically different. See the How To/Education Python section for more specific details, Jupyter notebooks, videos, and sample code/data.

The files below contain Python 2.x (older) and Python 3.x (more current) syntax. Some files contain the Pro project packages (PPKX) as well as the older ArcMap MXD documents. It is recommended to use the Pro package files and the Python 3.x script files. v3 indicates a Python 3.x syntax Python (py) files.

NOTE: The Chapter 10 Python Script tool for tasseled cap is updated with Python 3.x syntax and a Pro Project Package file is provided. The Chapter 10 simple Python function script has been updated with 3.x syntax. The Chapter 12 Batch File and Task Scheduler scripts and files have been updated to use Python 3.x syntax and Pro. The Chapter 10 Custom Script Tool Clip and Buffer has not been updated. The Python Script tool (Tasseled Cap example) is a better option. Chapter 11 Python Add-in scripts have not been updated for Python 3.x. These two items have no plans to update to Python 3.x.

If you would like to support the work I do, please consider purchasing a Kindle or hard copy version. Thank you!

WB I – The Fundamentalshttp://bit.ly/1yH80Zk

WB I – Kindle Version

WB II – The Core Geoprocessing Functionalityhttp://bit.ly/181Xn9k

WB II – Kindle Version

WB III – Functions, Script Tools, and Script Automation http://bit.ly/2b1S3rs

WB III – Kindle Version

Follow me on Twitter @urbandalegis to find out the latest changes and more about what I do.


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 )

Facebook photo

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

Connecting to %s