Run Python In VSCode In Python Shell Like IDLE
I am well aware of the thread How to execute Python code from within Visual Studio Code But none of them shows how to get the >>> python shell running with the file import
Solution 1:
you can run the file in an interactive mode in VSC code terminal by using the parameter -i : python -i py_file.py
Solution 2:
Ctrl+Shift+P (Command+Shift+P)
and type Python: Start REPL
. Click the command, and you'll get a interactive Python console.
Solution 3:
Assuming you have the official Python extension installed, you can search the command list (Ctrl+Shift+P) for "Python interactive" and you'll see several options that allow to do different variations of this:
Post a Comment for "Run Python In VSCode In Python Shell Like IDLE"