Clearing screen in Python (was: omg noob prob plz help)

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Aug 2006
Posts: 1
Reputation: riddz_22 is an unknown quantity at this point 
Solved Threads: 0
riddz_22 riddz_22 is offline Offline
Newbie Poster

Clearing screen in Python (was: omg noob prob plz help)

 
0
  #1
Aug 15th, 2006
is there anyway to clear the screen like if you are using cmd prompt??

yes i kno im a noob but any help would be greatly appreciated
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 523
Reputation: pty is on a distinguished road 
Solved Threads: 37
pty's Avatar
pty pty is offline Offline
Posting Pro

Re: omg noob problem plz help

 
0
  #2
Aug 15th, 2006
  1. >cls
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,109
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 943
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: omg noob problem plz help

 
0
  #3
Aug 15th, 2006
You can use the command shell:
  1. # with windows
  2. import os
  3.  
  4. os.system("CLS")
or
  1. # with linux
  2. import os
  3.  
  4. os.system('clear')
or
  1. # if you don't mind that the cursor is at the bottom
  2. print '\n' * 25
Actually, the best way is to design your program so you don't need the clear the screen.
Last edited by vegaseat; Aug 15th, 2006 at 7:45 pm.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 523
Reputation: pty is on a distinguished road 
Solved Threads: 37
pty's Avatar
pty pty is offline Offline
Posting Pro

Re: omg noob problem plz help

 
0
  #4
Aug 16th, 2006
yeah - didn't realise it was the python forum because I just clicked in from RSS
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC