python stdout carriage return
<p>i am running a for loop on a given set of files..and for monitoring purpose it writes output on which files are being currently processed..</p>

<pre><code>sys.stdout.write("\rProcessing.... "+ j)
sys.stdout.flush()
</code></pre>

<p>where j is filenames</p>

<p>output of script...</p>

<pre><code>Processing.... /etc/sysconfig/rhn/sources0.examplewn-slepcsbals-ipv6f
</code></pre>

<p>problem is that the carriage return "\r" does not clear the previous filename clearly and has previous filenames on it.</p>

<p>any idea how i can fix this..and make it more clear</p>
