Appendix B. Five Python Recipes Every GIS Programmer Should Know

In this chapter, we will cover the following topics:

  • Reading data from a delimited text file
  • Sending e-mails
  • Retrieving files from an FTP server
  • Creating ZIP files
  • Reading XML files

Introduction

In this chapter, you will learn how to write scripts that perform general purpose tasks with Python. Tasks, such as reading and writing delimited text files, sending e-mails, interacting with FTP servers, creating .zip files, and reading and writing JSON and XML files, are common. Every GIS programmer should know how to write Python scripts that incorporate these functionalities.

Get Programming ArcGIS with Python Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.