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?
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.
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