Cross platform way of clearing the screen in Python
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2084508/clear-terminal-in-python">clear terminal in python</a>  </p>
</blockquote>



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

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

<pre><code>&gt;&gt;&gt; if platform.system() == 'Linux': # call clear
</code></pre>

<p>The same goes for Windows, where I call <code>cls</code>.</p>

<p>Is this good or I can do better? </p>
