Automatically display results of last cell executi

2020-01-30 02:21发布

问题:

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.

in case this is not clear:

display = "1 2 3 4 5"

display

{Ctrl Enter}

would ouput:

1 2 3 4 5

to the console

now it does not display anything in the console

Thank you.

回答1:

What setting do I need to revert in order to get back to the prior set up?

You need to go to the menu

Tools > Preferences > Editor > Run Code

and activate the option called

Copy full cell contents to the console when running code cells.