By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,345 Members | 1,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,345 IT Pros & Developers. It's quick & easy.

Delete an Output

P: 176
Hello guys. I was just curious if it is possible to delete an outputted message e.g.

from time import sleep
print "Hello, world! This message will be deleted in 5 seconds."
#Delete the text command goes here.
Mar 26 '08 #1
Share this Question
Share on Google+
2 Replies

P: 314
It depends on your OS but as long as you're working with a terminal/command window you can issue a clear screen...
Expand|Select|Wrap|Line Numbers
  1. # if DOS
  2. os.system("cls")
  3. # if Linux
  4. os.system("clear")
Mar 26 '08 #2

P: 176
Neither of those commands worked when I was using Terminal. And I usually like to program using IDLE. Thanks anyways.
Mar 27 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.