Clear Terminal on Reload in Simulator (cheesy...)

2 replies [Last post]
OderWat
User offline. Last seen 28 weeks 17 hours ago. Offline
Joined: 4 Jun 2010

I just want to share this technique I just "invented" :)

When testing my App I hate it that the terminal window is filling up and scrolling for every reload in the simulator.

I searched a way to clear the terminal on every reload so it is easier to see what the output is for this single run.

After some time I found this... cheesy :) way to get a clear terminal for every reload:

1
2
3
4
os.execute('clear')
 
-- your code :)
print("Hello Again... World! It is "..os.date())

:) ... does anybody know a better way and or how to make this conditional for the device build?

Replies

myfogview
User offline. Last seen 2 weeks 4 days ago. Offline
Joined: 14 Apr 2010

Pressing Command+K when the Terminal is in focus will clear the content.

Sometimes having the previous terminal content is useful from one build to another.

Tom

OderWat
User offline. Last seen 28 weeks 17 hours ago. Offline
Joined: 4 Jun 2010

Yeah.. I know about pressing CMD+K.. thought I mentioned that in my post but did not.

I just do not like to swap windows and press keys all the time when I am testing stuff!

And of course I do not clear the screen automatically when I want to see previous output :)

I am currently testing with ASC playfield outputs from random generators. Which is much easier to compare visually when they are at the same screen position.

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.