Skip to content

Run Selection/Line in Python Terminal gives syntax errors when running selection with function def or other blocks #259

@arundeep78

Description

@arundeep78

Environment data

VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 3.6.2 :: Continuum Analytics, Inc./ 2.7.13 :: Anaconda 4.4.0 (x86_64)
OS and version: OSX El Capitan 10.11.6

Actual behavior

Tries to execute a block and gives a syntax error

image

However, while executing those block as individual blocks. e.g. def separate and print separate it works fine.

Expected behavior

It should execute the whole selection without issues.

Steps to reproduce:

  • Set Python as default interpreter
  • Execute any of the sample blocks by "Run Selection/Line command"

Logs

Output from Python Terminal
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-terminalbugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions