Hi. I have a basic script in python that outputs like this..
But how can I make it so the output stays in 1 line?
So it would look something like this..
..after the script got to 10%. So it just updated but printed on the same line.
I've seen this done before i just want to know how to do it. Any ideas?
Last edited by Scott; 10-21-2010 at 05:14 PM..
Reason: Please use code tags
use print with comma at the end (no newline) and output a \r at the beginning of your print... see if that helps.
---------- Post updated at 11:45 PM ---------- Previous update was at 11:44 PM ----------
You may have to investigate using a terminfo or curses library... what I put above won't clear the line... you can fake it by always outputting enough to blank out the old data (uses spaces for example).
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
Hello all,
Not sure if this question has been answered already.
I have some xml Element variable as below:
child19 = core_elem_dcache.find('stat')
child20 = core_elem_dcache.find('stat')
child21 = core_elem_dcache.find('stat')
child22 = core_elem_dcache.find('stat'Next I... (2 Replies)
Hey,
Is there a way I can print " in a command line?
When I type "echo "set variable = disco"".... This actually prints echo set variable = disco but I would like to print it out as --- echo "set variable = disco"
Thanks,
Satya (4 Replies)
I attempted to update Python on my CentOS 5.6 VM and have encountered some issues after then. Initially yum wouldn't work, but I have resolved that.
However, now I am unable to access the Network Configuration section under setup.
When I do select this option I see this at the command line:
... (2 Replies)
Hi,
I would like to know wheather it is possible to install python 2.6 on RedHat Ent Linux 5 (update8) using rpms?
I have checked by default Python 2.4 is installed.
or wheather Redhat 6.0 needs to be installed for python 2.6? (1 Reply)
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Hi,
I've a python script called aaa.py and passing an command line option " -a" to the script like, ./aaa.py -a
& Inside the script if the -a option is given I do some operation if not something else.
code looks like
./aaa.py -a
.
.
if options.a
---some operation---
if not options.a... (1 Reply)
Hi,
I have my code like this
v_site_eli=`sqlplus -s<<-EOsqlplus
$SQL_USERNAME/$SQL_PASSWD
WHENEVER SQLERROR EXIT SQL.SQLCODE
WHENEVER OSERROR EXIT FAILURE
SET TERM OFF
SET HEAD OFF
SET VERIFY OFF
SET FEEDBACK OFF
declare
VARIABLE vn_return_sts varchaR2(6);
begin
SELECT... (1 Reply)