Skip to content

Investigate a VS Code-native REPL experience #22674

Closed

Description

Investigate a VS Code-native REPL experience.
Listen to community feedback, discussion, studies, along with other mentioned IDEs tools to improve and implement VS Code native REPL experience!

Essential Requirements that needs to happen(Subject to Change):

  1. Prompt that is able to provide user with input prompt such as >>>
  2. Process input prompt, store commandline for history purposes.
  3. Provide user with correct return value, output results depending on success or failure,error,exception.

Potentially useful & requested REPL features from issue board, discussion, user studies, etc (Subject to Change):

  • Autocomplete (Can this be done by connecting native REPL to Pylance?)
  • Runtime environment access, potentially automatically importing user's library module listed in currently opened Python file.
  • Syntax Highlighting (Can this be done by connecting native REPL to Pylance?)
  • Easy access to history by typing "magic command" such as history
  • Variable panel with live updates to variable execution that happens via REPL
  • Dedicated or embedded area in REPL for visualization such as plot or graph.
  • Advanced autocomplete/ghost text using Copilot, adding on top of autocomplete.

Activity

  1. anthonykim1 commented on Mar 6, 2024

    @anthonykim1
    Author

    Question that needs research: How does Python's default interactive interpreter, know the "completeness" when user types their command next to >>> and press enter?
    For example, how is it that it is smart enough to figure out to run the code when user types print('Hello World') but not when user types my_multi = {
    Is it by AST? Is it by inspecting whether or not user is intending to run is a valid type or object in AST?

  2. blubberdiblub commented on Mar 9, 2024

    @blubberdiblub

    Question that needs research: How does Python's default interactive interpreter, know the "completeness" when user types their command next to >>> and press enter? For example, how is it that it is smart enough to figure out to run the code when user types print('Hello World') but not when user types my_multi = { Is it by AST? Is it by inspecting whether or not user is intending to run is a valid type or object in AST?

    You may additionally want to research how iPython does it, because I suspect it might use a different or augmented approach given that it introduces additional syntactical elements that need to be differentiated from the existing pure Python syntax and might even be in conflict with it in rare edge cases.

  3. anthonykim1 commented on Apr 29, 2024

    @anthonykim1
    Author

    Tangible product/spike can be visible here: #23029

  4. anthonykim1 commented on May 1, 2024

    @anthonykim1
    Author

    Should also think about experiences in Web when we decide on UI/UX on native REPL. Editor view (whether via already existing editor type) vs. Terminal view. Also should keep web experience in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-replfeature-requestRequest for new features or functionalityneeds spikeLabel for issues that need investigation before they can be worked on.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions