I am writing an FTP downloader. Part of to the code is something like this:
ftp.retrbinary("RETR " + file_name, process)
I am calling function process to handle the callback:
def process(data):
    print os.path.getsize(file_name)/1024, 'KB / ', size, 'KB downloaded!'
    file.write(data)
and output is something like this:
1784  KB / KB 1829 downloaded!
1788  KB / KB 1829 downloaded!
etc...   
but I want it to print this line and next time reprint/refresh it so it will only show it once and I will see progress of that download.
How can it be done?
 
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    