在Spyder 4控制台中自动显示最后一个单元执行的结果 [英] Automatically display results of last cell execution in Spyder 4 console
问题描述
我从Spyder 3升级到Spyder 4,现在执行单元格时,我需要在单元格最后一行中的变量周围包裹一个print(),以便在控制台中自动打印/显示内容.我需要还原什么设置才能返回到先前的设置.
I updgraded from Spyder 3 to Spyder 4 and now when I execute a cell I need to wrap a print() around whatever variable is in the last line of the cell so that the contents are automatically printed / displayed in the console. What setting do I need to revert in order to get back to the prior set up.
以防万一:
display ="1 2 3 4 5"
display = "1 2 3 4 5"
显示
{Ctrl Enter}
{Ctrl Enter}
输出:
1 2 3 4 5
1 2 3 4 5
到控制台
现在它在控制台中什么都不显示
now it does not display anything in the console
谢谢.
推荐答案
我需要还原什么设置才能恢复到先前的设置?
What setting do I need to revert in order to get back to the prior set up?
您需要进入菜单
Tools > Preferences > Editor > Run Code
并激活名为
Copy full cell contents to the console when running code cells
.
这篇关于在Spyder 4控制台中自动显示最后一个单元执行的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!