How to clear output in Vte.Terminal?

362 Views Asked by At

How to clear all output in Vte.Terminal ?

5

There are 5 best solutions below

0
On

I'm using

vte.fork_command("clear")
0
On

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.

0
On

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.

0
On
vte.feed('\033[2J')

For other escape sequences:

0
On

use the os library

import os

os.system('clear')