LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-16-2005, 08:24 AM   #1
jake_01
LQ Newbie
 
Registered: Apr 2005
Posts: 4

Rep: Reputation: 0
print to screen...


hello,
you know when wget prints out it's process information continually on the same line; i.e. it refreshes the line and then rewrites the speed of transfer etc. How do I do that using perhaps C or a python module?
many thanks
Jake
 
Old 05-16-2005, 09:35 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
From the source :
http://cvs.sunsite.dk/viewcvs.cgi/wg...viewcvs-markup

wget seems to use "\r" char to return to the beginning of line then print the buffer

Code:
static void
display_image (char *buf)
{
  int old = log_set_save_context (0);
  logputs (LOG_VERBOSE, "\r");
  logputs (LOG_VERBOSE, buf);
  log_set_save_context (old);
}
 
Old 05-16-2005, 10:43 AM   #3
jake_01
LQ Newbie
 
Registered: Apr 2005
Posts: 4

Original Poster
Rep: Reputation: 0
thanks allot! I no had no idea the solution was so simple.....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Print screen ??? shaahul Linux - Newbie 6 05-08-2006 11:33 AM
How to Print a Screen bpellet314 Linux - Software 2 05-08-2006 09:24 AM
Print Screen: How? hongman Linux - Newbie 7 03-09-2005 12:33 PM
Print Screen katana Linux - General 3 02-15-2002 12:52 AM
Print Screen Artamir Linux - Newbie 2 11-27-2001 03:14 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration