You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate a VS Code-native REPL experience #22674
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):
Prompt that is able to provide user with input prompt such as >>>
Process input prompt, store commandline for history purposes.
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.
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?
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.
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.
Activity
anthonykim1 commentedon Mar 6, 2024
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 typesmy_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?
blubberdiblub commentedon Mar 9, 2024
You may additionally want to research how
iPythondoes 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.anthonykim1 commentedon Apr 29, 2024
Tangible product/spike can be visible here: #23029
anthonykim1 commentedon May 1, 2024
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.