python refresh/reload

后端 未结 7 1036
北海茫月
北海茫月 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:28

    The cases will be different for different versions of python. Following shows an example of python 3.4 version or above:

    hello import hello_world
    #Calls hello_world function
    hello_world()
    HI !!
    #Now changes are done and reload option is needed
    import importlib
    importlib.reload(hello)
    hello_world()
    How are you?
    

    For earlier python versions like 2.x, use inbuilt reload function as stated above. Better is to use ipython3 as it provides autoreload feature.

提交回复
热议问题