Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
262 views
in Technique[技术] by (71.8m points)

python - Automatically display results of last cell execution in Spyder 4 console

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...