Use IPython REPL in VS Code

前端 未结 6 1417
天涯浪人
天涯浪人 2020-12-29 04:15

Using the Python extension of Visual Studio Code, I can select some code, right-click it, and select \"Run Selection/Line in Python Terminal\" (alternatively, I can hit Shif

6条回答
  •  长发绾君心
    2020-12-29 04:49

    Type Ipython inside the terminal window. Then select the line or lines you want to run from the editor window and then click on the Terminal menu at the top of VScode window. One option in the Terminal menu is to "Run Selected Text". This will be run in the Ipython terminal window. I don't know how to make this the default but it appears to remain in that state unless Ipython is stopped. Note: You have to run your selections using the Menu item. Right-clicking in the editor window and clicking on "Run Selection" will not use the Ipython window. I hope this is clear. If not just drop a comment.

提交回复
热议问题