How to clear output in Vte.Terminal?

399 Views Asked by At

How to clear all output in Vte.Terminal ?

5

There are 5 best solutions below

0
Micah Carrick 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
Quentin Engles 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
tfga On
vte.feed('\033[2J')

For other escape sequences:

0
Guillaume On

I'm using

vte.fork_command("clear")
0
AudioBubble On

use the os library

import os

os.system('clear')