forked from DonJayamanne/pythonVSCode
-
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
Allow execute on enter for IW REPL #23440
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds a setting to switch between `native` and `js` locators.
**Fixes** * microsoft#23413 * & the fact that we always use the same conda exe to manage all conda envs, even if multiple are installed. * Step 1: * Look for conda install folders in known locations such as `/<user home>/miniconda3`, `<user profile>/Anaconda3` * Step 2: * For each install location identified, inspect that folder and extract the * Conda executable * All environments belonging to that conda installation * Step 3: * Old approach, * 1. find any conda in sys path or other locations and find conda installation via that mechanism * 2. Get all envs from environments.txt file (any remaining conda envs not discovered in 1 & 2 will be discoverred here and use some the global conda exe) Once we have step 1 and 2, I do not expect anything new to show up in step 3, Even if users install conda into some custom locations (the solution would be to run step 1 with the custom location provided by user in settings.json file) **How to find environments?** * Look in the `envs` folder of the conda installation * Look at the entries in the `environments.txt` file * Look at the `env_dirs` in the `.condarc` file With these two, we should be able to eliminate the need to ever spawn conda to get the env directories. **How do we know whether a conda environment belongs to a specific conda installation** * If it is in the `envs` sub directory of the conda installation * Else, have a look at `<env folder>/conda-meta/history` file to look at the conda installation that was used to create this environment
Allow users to use Interactive Window UI with Python custom REPL controller instead of iPykernel. Closes microsoft#23175 Closes microsoft#23174 Closes microsoft#23029 Majority of: microsoft#23332 Context menu under Python for running Python REPL code using IW UI should only appear when user's ```pythonRunREPL``` experiment is enabled.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
"Smartly" allow execute on enter for the #23235 experiment.
User should be able to execute when they press enter on text input box of interactive window trigger from Python extension, whereas we would "wait" and allow insertion of new line after detecting user's Python command is not complete.
When the user finally types enter again on a blank line, we should just proceed to execute whatever code, regardless of whether it is complete/valid or not to replicate Python's original interactive REPL behavior.
Basically creating Python command and registering that for keybinding of 'Enter'.
This would conditionally call interactive.execute which would then eventually call our execute handler contributed from Python n extension's REPL controller, or go ahead and insert,pass in Enter to the text input box to allow user to type "complete" code.