-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Python run #7628
Python run #7628
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this idea of showing of usage of native REPL. We could also show off how to trigger from right clicking into "Run Python" too.
Also may be beneficial to import one of the standard libraries and show we are getting intellisense from Pylance for library methods. This might attract more people to be interested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to hold off on showing the routing from the context menu and Shift+Enter until we roll it out fully. But I do love the idea of showing using a std lib. Will work on updating that
docs/python/run.md
Outdated
|
||
The VS Code Native REPL for Python builds upon the classic Python REPL and provides additional features such as Intellisense and syntax highlighting to make your Python development experience more efficient. However, this REPL still adheres to principles present in the REPL built-in to Python itself, in that historical execution order and its content are immutable. | ||
|
||
You can open the Native REPL via the Command Palette (`kb(workbench.action.showCommands)`) by searching for **Python: Start Native REPL**. Furthermore, you can send code to the Native REPL via Smart Send (`kbstyle(Shift+Enter)`) and **Run Selection/Line** by setting `"python.REPL.sendToNativeREPL": true` in your `settings.json` file. You can opt to continue to use the REPL built-in to Python located in the terminal ( `>>>` ) by setting `"python.REPL.sendToNativeREPL": false` in your `settings.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to how Run Selection/Line in Python Terminal is put for Terminal REPL. We could change Run Selection/Line into Run Selection/Line in Python REPL
|
||
4. Place your cursor on a line of code and press `kbstyle(Shift+Enter)` to activate Smart Send. | ||
|
||
### Smart Send |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this section for smart send - many folks wanted additional space that explains smart send.
For the beginners, it would also be really helpful to add two small video that runs Python code (say a dictionary) with & without smart send. This is in case they have trouble understanding how we describe smart send.
Could we add a "See also" section at the end? Maybe exactly like the one for testing: https://github.com/microsoft/vscode-docs/blob/f9ff9b54a75f7bdb7c9e2610c68ca840d64d6ef6/docs/python/testing.md#see-also |
Co-authored-by: Luciana Abud <45497113+luabud@users.noreply.github.com>
@luabud Love this idea! Just added a section and linked testing and debugging. Curious if you think we should move this page after editing? Currently it is set to be 3 on the ToC |
@cwebster-99 I don't have a strong preference, I could make an argument for either options :p |
Adding a Run Python Code docs page to outline various ways users can execute Python code either in a REPL or Python file.
Unsure if we want this to be labeled "Run Python Code" or "Execute Python Code"