-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Very confusing (and limiting) mix of options for running python terminal/repl #7206
Comments
The following is quoted from the user guide and seems to imply that selection should be sent to the REPL created by the user:
Now, the REPL created by the user is named REPL, the one created by sending a selection is called Python, and they are never the same one. Given what is documented, the behavior is not only inconvenient and confusing, as described in my previous comment, but also a bug. |
Hi @memeplex, thank you for this feedback! So if I understood correctly, you would expect the "Python: Create Terminal" to create a REPL instead of a blank terminal, since the command name starts with "Python", is that correct? Right now the behaviour of the "Python: Run Selection/Line in Python Terminal" is to create a new terminal and start the REPL when it's run for the first time, and after that it'll keep sending the selections to the same one. You'll notice that if you quit that REPL, this command will still send selections to the terminal as the extension has no information if there's a REPL running on the terminal or not. I agree that this experience is not ideal, but meanwhile we've been putting more efforts to give a great interactive experience with the Python Interactive Window ("Python: Show Python Interactive Pane" command). Have you tried this with the extension already? If not, please do give it a try and let us know if it doesn't work for your workflow. Again, thank you so much for taking the time to provide this feedback! |
Hi @luabud, thank you for your prompt reply! I think it could be simplified to just these three actions:
Something along those lines is done by other editors with python support I used in the past. More sophisticated approaches are also possible, like connecting an editor to a specific REPL, but I think the above suggestion is closer to what you have now and still more intuitive, simple and powerful (the last one because it allows for a workflow better mixing code from a file and code directly entered into the REPL). |
Btw, the interactive python window is ok, but at this moment is limited to one instance. Besides it requires launching a jupyter kernel, which could be overkilling for quickly sending a selection to a REPL. Moreover, some things (like |
@memeplex I see, thank you for the suggestion! I marked this issue as an "enhancement" and "needs decision", so we can have a conversation about your idea 😊 cc @ronglums for feedback on the interactive window in the comment above |
Please have a look at this comment on #2997. |
Closing this as Duplicate of #2997 |
Environment data
There are at least four options:
Expected behaviour
At least, this use case should be supported: the user opens a python terminal / REPL and later sends a selection to this same REPL.
Also IMHO 1 and 2 are very much overlapping and it's not clear at all why the user would create a terminal named Python without a python REPL in it and that won't even be used by 3 or 4.
Actual behaviour
Option number 1 creates a shell terminal without running any python REPL in it. This is very confusing per se, but worse: the terminal is named Python but still is not used by 3 nor by 4.
Options 3 and 4 don't use the terminal created by 1 nor the REPL created by 2, but their own python terminal (also named Python).
This means that there is no way to open a REPL, do some exploration/interactive stuff and then send a selection to it. The only way to open a REPL that would later accept selections is to open it sending a selection (or file). This forces the user to send a dummy selection in order to open a selection-accepting REPL/terminal.
Steps to reproduce:
I think this is clear from the above description. There are many scenarios. Here is one:
The text was updated successfully, but these errors were encountered: