【问题标题】:run defined function spyder运行定义的函数 spyder
【发布时间】: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,它会在下次导入时重新加载。

标签: python function spyder


【解决方案1】:

只要您使用 F5 或从菜单运行包含导入的文件,Spyder 就会自动完成此操作

Run > Run

【讨论】:

    猜你喜欢
    • 2021-12-14
    • 2011-10-22
    • 2019-12-16
    • 1970-01-01
    • 2021-01-21
    • 1970-01-01
    • 1970-01-01
    • 2011-06-24
    • 1970-01-01
    相关资源
    最近更新 更多