0

Possible Duplicate:
clear terminal in python

I have a Python script that I am targetting Windows and Linux users with -- the script runs from the command line only.

Before starting the script, I'd like to clear the screen. The best I could come up with was using the platform module and then calling subprocess.

>>> if platform.system() == 'Linux': # call clear

The same goes for Windows, where I call cls.

Is this good or I can do better?

Community
  • 1
  • 1
user225312
  • 126,773
  • 69
  • 172
  • 181

0 Answers0