DEV Community

Diogo Rosanelli
Diogo Rosanelli

Posted on

ArcGIS Toolbox Reload

If you are a developer in the ArcGIS universe, have you ever had to develop a tool using a Python Toolbox (.pyt), and came across a problem: when updating the source code of your tool, you had to close ArcGIS Pro and open it again for the updates to be made.

The ArcGIS environment uses the compiled version of Python codes (.pyc), and therefore references need to be reloaded explicitly within the source code, and you can do this through the importlib library that reloads the reference for your module, and it is then updated without that you may need to restart ArcGIS Pro to test changes to your code.

Image description

Have you ever experienced this situation? What do you think of this resource? Did you already know this code tip? Leave a comment...

DEV #PYTHON #ARCGIS #ESRI #RELOAD #MODULE #PYT #PYC #TOOLBOX

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs