clear screen

313 views
Skip to first unread message

Wattana Ratanaaparoj

unread,
Feb 20, 2022, 5:02:47 AM2/20/22
to thonny
Hi, I;ve read in previous requests but it seems like not exactly same as mine. Normally, I will clear screen on other Python REPL by print command of these 2 series. of \x1B\x5B2J" and "\x1B\x5BH"  which similate #VT100 (x1B=ESC) a=clear screen, b=upper left corner cursor. In Thonny I found only way to hard key of ctrl+l . What should I send any byte series to Thonny representative of hard key of ctrl+l instead?
your kind suggest much appreciated, 

Aivar Annamaa

unread,
Feb 20, 2022, 10:29:23 AM2/20/22
to thonny
Hi!

Thonny's shell is not a proper terminal emulator, so it has very limited support for ANSI codes (https://github.com/thonny/thonny/blob/master/thonny/plugins/help/shell.rst#colored-output). What you are looking for is in the TODO list though: https://github.com/thonny/thonny/issues/1697

Best regards,
Aivar

Luis Carlos de Lima

unread,
Mar 18, 2022, 2:11:51 PM3/18/22
to thonny
Hi! Well I have another suggestion. I'm also interested in the same thing: clear the shell when starting a program. Now I do it using the two ways mentioned: ctrl+L and right mouse button. If it's possible, you can make available the commands that are used when we press that set of keys (ctrl+L) and interested users can write a small function to do it whenever they need to. I imagine that would make everyone happy, myself included.

Wattana Ratanaaparoj

unread,
Mar 19, 2022, 12:59:40 AM3/19/22
to Luis Carlos de Lima, thonny
Yes,
I guess that we all are thinking the same way, we just need to know what binary stream that Thonny send out once user either press ctrl+L or click on mouse...
best regards,

--
You received this message because you are subscribed to a topic in the Google Groups "thonny" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/thonny/rwHElFfKYr0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to thonny+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thonny/a1b16cfa-9f04-4664-a731-541eca9a8935n%40googlegroups.com.


--
Wattana R.
Reply all
Reply to author
Forward
0 new messages