Butchijo
Posts: 5
Joined: Sat Aug 29, 2015 9:54 am

Printing without 'next line' and overwrite previous data

Sat Oct 10, 2015 10:34 am

Hi,
I am writing a simple python test program that repeatedly reads a string value (from a file) and i want to print that value to the same line on the console (using Putty) and overwriting the previous output to that line on the screen. So basically i want to print with only a 'return' and no 'linefeed'.
Can somebody suggest how to do that.

An alternative method may be to print over and over to a specific coordination on the Putty console screen. Is there in Python a way to do that.

BTW I am using Putty/SSH to connect to the raspberry pi

Hope somebody can help.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Printing without 'next line' and overwrite previous data

Sat Oct 10, 2015 11:38 am

This was the first thing on Google:
http://stackoverflow.com/questions/4897 ... python-2-5
There are 10 types of people: those who understand binary and those who don't.

Return to “Python”