Like I want my console to show the current code when I press run not to show the old code I built which is on top of the current one which makes it look messy
I tried to search for it but I couldn’t find any help so can somebody please help me about it.
If you provide a project link, I or others could help. Also, more context is needed. Do you want to show new code and not old code, but you want to keep old code?
I want it to show my new code only, not the old code like basically refreshing the old code into the new code. It happened before on another laptop but on my current device, I’m not seeing what I want.
I’ll send an image to evaluate what I want my console display to look like:
A recent update changed the console.
There is a feature request to bring the old console back.
I doubt they will be bringing it back though.
There is a “workaround” to get rid of the previous runs outputs. Basically, you print a bunch of lines to push the previous runs away, and then you clear the current console. Here is a python version:
Ah i see now. There’s 2 ways to do it. replit.clear which I’m not sure if that’s it or if there’s another part, and the way i do it for now.
import os
def clearConsole():
os.system('clear')
Call the functions when you wanna clear the console. Theirs is a better and faster way to do it but that’s Howe i do it.
edit2: When you do this, make sure to have a userInput or time.sleep because it will just instantly clear and move on wherever you put the clearConsole() of you do it my way
edit: Whoever changed the code to look like code thank you I didn’t know how to do that