1

How to clear all output in Vte.Terminal ?

ptomato
  • 56,175
  • 13
  • 112
  • 165
deni123
  • 103
  • 1
  • 3

5 Answers5

1

use the os library

import os

os.system('clear')
0

It would only clear the text visible in the terminal, but, you can run the cls command or tinker with the feed() method and empty spaces.

Micah Carrick
  • 9,967
  • 3
  • 31
  • 43
0

I have been having some problems of my own with Vte so I don't know if I'm the right person to answer.

Have you tried replacing the old terminal with another in the container? It's not clearing, but there will be an empty terminal.

Quentin Engles
  • 2,744
  • 1
  • 20
  • 33
0
vte.feed('\033[2J')

For other escape sequences:

tfga
  • 51
  • 5
0

I'm using

vte.fork_command("clear")
Guillaume
  • 2,752
  • 5
  • 27
  • 42