skip to Main Content

I’m writing code in Python and using both the default IDLE and Visual Studio Code as my development environments. I was wondering if there is a interactive shell like the one in IDLE in vscode, where I can run code and then enter the variable name to find out its value. I’ve been having trouble finding a shell-like feature in VSCode, similar to IDLE’s shell. Is there any way to use IDLE’s shell functionality within VSCode?

I tried using the terminal to set up a simple interactive interpreter, but I encountered an error. Is the terminal not suitable for using as an interactive interpreter?

2

Answers


  1. Open a new terminal in vscode Ctrl + Shift + `

    Run the python command

    Then you have an interactive python shell

    Python 3.11.3 (main, Jun  5 2023, 09:32:32) [GCC 13.1.1 20230429] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    

    Note: keybindings might differ on mac.

    Login or Signup to reply.
  2. Python Interactive window is a nice mix between Jupyter and IDLE

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search