Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be able to provide string argument to python.datascience.execSelectionInteractive for extensibility. #1689

Closed
andycraig opened this issue Oct 1, 2020 · 5 comments

Comments

@andycraig
Copy link
Contributor

Feature: Notebook Editor, Interactive Window, Python Editor cells

python.datascience.execSelectionInteractive executes the current selection in the Interactive Window. How about a command that accepts a string argument and executes that in the Interactive Window? Other extensions could then call this to provide more complicated versions of python.datascience.execSelectionInteractive, such as executing and advancing to the next line (#13495) or auto-detecting and executing whole code blocks (#4978).

It's straightforward to send specified text to Python or IPython running in the terminal, but as far as I know there's currently no way to send specified text to the Interactive Window. (Apologies if I've missed an existing command that allows this.)

Thank you.

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

@DonJayamanne
Copy link
Contributor

Thanks for the suggestion, we will discuss this in our triage meeting.

@DonJayamanne DonJayamanne removed their assignment Oct 1, 2020
@greazer greazer changed the title Execute string in Interactive Window Be able to provide string argument to python.datascience.execSelectionInteractive for extensibility. Oct 1, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@andycraig
Copy link
Contributor Author

Would you be interested in an external contributor PR for this?

In line with the title, I would add a string argument to python.datascience.execSelectionInteractive. If the argument is provided, it would send that string to the Interactive Window. If no argument is provided, it would follow the current behaviour: send the selection (or line, if there is no selection) to the Interactive Window.

@DavidKutu
Copy link

@andycraig we always welcome contributions!

@andycraig
Copy link
Contributor Author

@DavidKutu Great! I will have a try at it.

@andycraig
Copy link
Contributor Author

Feature added in #5053.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants