473,325 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

print to end of line in a terminal

Hey.

This might seem as a arbitrary question to some. Anyway, I'm wondering how I go about printing text to the end of a line in a terminal/console. I've been googling it for a few days without any success. Any suggestions will be greatly appreciated.
Regards
Feb 27 '08 #1
2 1660
dazzler
75
Hey.

This might seem as a arbitrary question to some. Anyway, I'm wondering how I go about printing text to the end of a line in a terminal/console. I've been googling it for a few days without any success. Any suggestions will be greatly appreciated.
Regards
do you mean that you want to print overwriting old text to same line without making new line? like a progress meter going from 0% to 100% ?
Feb 29 '08 #2
I was wondering about that too, except not same line. Scenario where program gets user input from stdin and instead of outputting result on next line, output same line user entered input.

Normally this happens because user must press enter to submit text
./test
Please enter a number: 32
You entered 32.

I would like to do this:
./test
Please enter a number: 32 You entered 32.
Mar 10 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ricardo Bugalho | last post by:
Hello, I'm using Python 2.3.4 and I noticed that, when stdout is a terminal, the 'print' statement converts Unicode strings into the encoding defined by the locales instead of the one returned by...
3
by: Anthony Liu | last post by:
We know that if we do print '\a' the bell will sound. Now, why do I hear the sound on my local machine when I run a python script on a remote host? I understand if I hear it when I do
9
by: kernelxu | last post by:
hi,everybody. I calling function setbuf() to change the characteristic of standsrd input buffer. some fragment of the progrem is: (DEV-C++2.9.9.2) #include <stdio.h> #include <stdlib.h> int...
5
by: sam | last post by:
hi all, i continue to footle around on my spanking new ultra 20 (1.8GHz / Opteron Model 144), gradually trying to get to grips with python and unix both. the slow print time in IDLE had...
9
by: cniharral | last post by:
Hi, I'm interested in printing out coloured lines of my application and I don't know what to use. Can anybody give me an idea?? Regards. Carlos Niharra López
8
by: =?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7z | last post by:
I lookup the utf-8 form of delta from the link. http://www.fileformat.info/info/unicode/char/0394/index.htm and then I want to print it in the python ( I work under windows) #!/usr/bin/python...
7
by: =?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7z | last post by:
Who could explain the follow issue ? ¦¤ Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'gbk' codec can't encode character u'\x80' in position 0: il...
13
by: ramif | last post by:
Is there a way to print extended ASCII in C?? I tried to code something, but it only displays strange symbols. here is my code: main() { char chr = 177; //stores the extended ASCII...
2
by: ndlarsen | last post by:
Hey. This might seem as a arbitrary question to some. Anyway, I'm wondering how I go about printing text to the end of a line in a terminal/console. I've been googling it for a few days without...
4
by: amit.uttam | last post by:
Hey there, I have a simple question about python print statement. Take the following code snippet for example... 1 print "-#- executing: %s" % section, 2 tests =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.