Visual studio code interactive python console

后端 未结 3 441
别那么骄傲
别那么骄傲 2021-02-07 00:22

I\'m using visual studio code with DonJayamanne python extension. It\'s working fine but I want to have an interactive session just like the one in Matlab, where after code exec

3条回答
  •  粉色の甜心
    2021-02-07 00:51

    I added the following lines into user setting file, then it works. Select some lines of python code, then right-click and select Run selected code in python terminal

    Solution 1: Will start iPython terminal

       "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
       "terminal.integrated.shellArgs.windows": ["/K ipython"],
    

    Solution 2: Will start a terminal like "python -i"

       "python.terminal.launchArgs": ["-i"],
    

提交回复
热议问题