python refresh/reload

后端 未结 7 1040
北海茫月
北海茫月 2020-11-27 17:58

This is a very basic question - but I haven\'t been able to find an answer by searching online.

I am using python to control ArcGIS, and I have a simple python scrip

7条回答
  •  半阙折子戏
    2020-11-27 18:46

    I had the exact same issue creating a geoprocessing script for ArcGIS 10.2. I had a python toolbox script, a tool script and then a common script. I have a parameter for Dev/Test/Prod in the tool that would control which version of the code was run. Dev would run the code in the dev folder, test from test folder and prod from prod folder. Changes to the common dev script would not run when the tool was run from ArcCatalog. Closing ArcCatalog made no difference. Even though I selected Dev or Test it would always run from the prod folder.

    Adding reload(myCommonModule) to the tool script resolved this issue.

提交回复
热议问题