How can I run my currently edited file in a PyCharm console in a way that I can type into the command line afterwards?

前端 未结 3 958
不知归路
不知归路 2020-12-13 14:38

I want this so I can retain the command line history after repeated runs, and to paste lines from the console into tests etc. Exactly like in IDLE.

[I realize this q

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 15:22

    Select the code fragment or the entire file, then use Execute Selection in Console from the context menu.

提交回复
热议问题