python_wiki:clear_screen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
python_wiki:clear_screen [2014/11/24 22:42]
billdozor
python_wiki:clear_screen [2015/03/09 23:24]
billdozor
Line 1: Line 1:
 ====== Clear Screen ====== ====== Clear Screen ======
-A clear screen function that uses:+ 
 +**General Information ** 
 + 
 +A clear screen function that supports Windows, Unix, or Linux CLI programs. 
 + 
 +**Checklist**
   * sys : to check for platform   * sys : to check for platform
   * subprocess : to send commands to the OS   * subprocess : to send commands to the OS
 +
 +----
 +
 +===== The Code =====
  
 <code python> <code python>
Line 13: Line 22:
     subprocess.call("clear", shell=True)     subprocess.call("clear", shell=True)
 </code> </code>
 +
 +==== Usage ====
  
 Call this function to clear the command line screen: Call this function to clear the command line screen:
  • python_wiki/clear_screen.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)