Skip to content

os.system('cls') does not clear the screen when redirect is enabled #246

@huguesv

Description

@huguesv

from customer feedback at https://developercommunity.visualstudio.com/content/problem/992505/python-clear-screen-broken.html

Environment data

  • PTVSD version: debugpy 1.0.0b5
  • OS and version: windows
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7
  • Using VS Code or Visual Studio: Visual Studio

Actual behavior

os.system('clr') prints control character and does not clear the screen

Expected behavior

os.system('clr') clears the console window when debugging

Steps to reproduce:

  1. Make sure redirect output is enabled

image

  1. Print some stuff and clear the screen

image

Note that disabling redirect output solves the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions