【发布时间】:2016-11-19 03:04:49
【问题描述】:
我使用 spyder 作为 python 编辑器。 在我的代码的开头,我导入了我编写的函数,例如
from my_functions_file import function_1
当我在文件my_functions_file.py 中修改function_1 时,我必须关闭并重新打开 spyder 才能更新它(即运行更新版本)。
有没有办法在不重新启动 spyder 的情况下运行更新版本? 我尝试再次运行该行
from my_functions_file import function_1
【问题讨论】:
-
奇怪,一旦你保存
my_functions_file,它会在下次导入时重新加载。