Skip to content

Support sending selection to terminal using using IPython #17690

Closed
@alandema

Description

@alandema

Environment data

  • VS Code version: 1.61.0 (user setup)
  • Extension version: 2021.10.1317843341
  • OS and version: W10 21H1
  • Python version (& distribution if applicable, e.g. Anaconda): Miniconda python 3.9.5
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Value of the python.languageServer setting: Pylance

Expected behaviour

with shortcut as:
{
"key": "ctrl+enter",
"command": "python.execSelectionInTerminal"
}

and using an IPython console:
"python.terminal.launchArgs": [
"-m",
"IPython"
],

When Ctrl + Enter, the expected is to send the lines to terminal and execute it as is.

Actual behaviour

When defining a function, the indentation goes crazy and for particular codes the console returns an indentation error. The same code works fine if executed or debugged or used in IPython in another IDE or running in the vanilla Python console.

Steps to reproduce:

vscode

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions