This is for a really simple project just for fun, called Brendonio’s Big Belly - the point is that it is similar to a clicker, so I have everything in a while loop that loops and reprints.
However, when you run the code, nothing shows up until you press a key, which was not intentionally coded. In addition, after you press the key, it will wait about 1 second and then disappear again.
I think a more clear solution is that you should use print("\033c", end="", flush=True) because os.system("clear") (IIRC) literally prints enough lines to overflow the current text and push it out of the console whereas ansi commands like \033c are used to directly clear the text on the console. Moreoever, through stress tests, the \033c should clear the screen even on replit in a timely manner as long as it’s not a rate more than 5/second Otherwise if you want to do something more intensive, I recommend self hosting or using a smaller service with less stress on their API
Hmm, I tried doing it but it didn’t work. I still have the issue where it requires me to press a key to activate it which is really weird. When I press the key, though, it waits one second and clears without reprinting which is pretty odd
oh :(( could you just go to it and input the username “bigminiboss” it happened because back in the day ppl would post join links and random ppl would join
Oof this is really embarrassing but now you have to press a key to iterate the while loop because of the readchar() thing so it’s no longer functional. . .
from readchar import readkey
from threading import Thread
import time
currentKey = ""
def myFunction():
while True:
print(currentKey)
time.sleep(1)
Thread(target=myFunction).start()
while True:
currentKey = readkey()
EDIT: Thanks to Firepup650 for alerting me about the bug