Skip to content

Commit bbc4efa

Browse files
committed
Updating to reference Smart Send
1 parent 42df008 commit bbc4efa

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/languages/python.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ To experience Python, create a file (using the [File Explorer](/docs/getstarted/
3535
print("Hello World")
3636
```
3737

38-
The Python extension then provides shortcuts to run Python code using the currently selected interpreter (**Python: Select Interpreter** in the Command Palette). To run the active Python file, click the **Run Python File in Terminal** play button in the top-right side of the editor.
38+
The Python extension then provides shortcuts to run Python code using the currently selected interpreter (**Python: Select Interpreter** in the Command Palette). To run the active Python file, click the **Run Python File** play button in the top-right side of the editor.
3939

4040
![Using the run python file in terminal button](images/python/run-python-file-in-terminal-button.png)
4141

42-
You can also run individual lines or a selection of code with the **Python: Run Selection/Line in Python Terminal** command (`kbstyle(Shift+Enter)`). If there isn't a selection, the line with your cursor will be run in the Python Terminal. An identical **Run Selection/Line in Python Terminal** command is available on the context menu for a selection in the editor. The same terminal will be used every time you run a selection or a line in the terminal/REPL, until that terminal is closed. The same terminal is also used for **Run Python File in Terminal**. If that terminal is still running the REPL, you should exit the REPL (`exit()`) or switch to a different terminal before running a Python file.
42+
You can also run individual lines or a selection of code with the **Python: Run Selection/Line in Python Terminal** command (`kbstyle(Shift+Enter)`). If there isn't a selection, Smart Send will send the smallest runnable block of code around the line where your cursor is placed to the Python Terminal. An identical **Run Python > Run Selection/Line in Python Terminal** command is available on the context menu for a selection in the editor. The same terminal will be used every time you run a selection or a line in the terminal/REPL, until that terminal is closed. The same terminal is also used for **Run Python File in Terminal**. If that terminal is still running the REPL, you should exit the REPL (`exit()`) or switch to a different terminal before running a Python file.
4343

4444
The Python extension automatically removes indents based on the first non-empty line of the selection, shifting all other lines left as needed.
4545

docs/python/python-tutorial.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,21 @@ For full details on editing, formatting, and refactoring, see [Editing code](/do
142142

143143
## Run Python code
144144

145-
Click the **Run Python File in Terminal** play button in the top-right side of the editor.
145+
Click the **Run Python File** play button in the top-right side of the editor.
146146

147-
![Using the Run Python File in Terminal button](images/tutorial/run-python-file-in-terminal-button.png)
147+
![Using the Run Python File button](images/tutorial/run-python-file-in-terminal-button.png)
148148

149149
The button opens a terminal panel in which your Python interpreter is automatically activated, then runs `python3 hello.py` (macOS/Linux) or `python hello.py` (Windows):
150150

151151
![Program output in a Python terminal](images/tutorial/output-in-terminal.png)
152152

153153
There are three other ways you can run Python code within VS Code:
154154

155-
1. Right-click anywhere in the editor window and select **Run > Python File in Terminal** (which saves the file automatically):
155+
1. Right-click anywhere in the editor window and select **Run Python > Run Python File in Terminal** (which saves the file automatically):
156156

157157
![Run Python File in Terminal command in the Python editor](images/tutorial/run-python-file-in-terminal.png)
158158

159-
2. Select one or more lines, then press `kbstyle(Shift+Enter)` or right-click and select **Run Selection/Line in Python Terminal**. This command is convenient for testing just a part of a file.
159+
2. Select one or more lines, then press `kbstyle(Shift+Enter)` or right-click and select **Run Python > Run Selection/Line in Python Terminal**. Alternatively, you can activate Smart Send using `kbstyle(Shift+Enter)` without a selection and the Python extension will send the smallest runnable block of code near where your cursor is placed to the terminal. This command is convenient for testing just a part of a file.
160160

161161
3. From the Command Palette (`kb(workbench.action.showCommands)`), select the **Python: Start REPL** command to open a REPL terminal for the currently selected Python interpreter. In the REPL, you can then enter and run lines of code one at a time.
162162

0 commit comments

Comments
 (0)