LocationsServedMaintenance.py (12.0 KB)
The purpose of this utility is to output strings which mimic the keystrokes needed to delete and/or add location codes en masse when maintaining Locations Served groups in Admin Corner. Please see the comments in the Python code for details.
For the past few years, I had been using a Linux shell script version of this utility which wasn’t nearly as fast, versatile or convenient. In the latter half of 2025 and again this winter, I found myself performing a lot of reorganizational work in Locations Served and decided it was time to code a better version.
To the Python coders out there, this utility uses the argparse Python module to help manage command line parameters. Please see the documentation in the code as well as the help output in argv-argparse Demo.txt (5.3 KB).
File this under “Short Lifespan Code”, since Innovative is redesigning the Locations Served UI for the Sierra 6.7 release. Still, I have made good use of this utility since writing it earlier this year and I hope at least a few Sierra admins out there can benefit before they upgrade to 6.7.
For those who attended The Great ILS-Data Pre-Conference at IUG 2026, this utility and Python’s argparse module in particular was the topic of my Speed Geeking session. For those not in attendance, you missed the opportunity to pay $50 to hear seven presenters simultaneously and repeatedly shouting over each other in an uncomfortably small room for the first 90 minutes. It was like a School Board meeting, but with civility.