> I played around with this output issue and I love the way it works.
> Now, how do you do this in *nix? I tried the same approach and I get
a
> blank line for 5 seconds (or whatever number of cycles you have on
your
> example) and the a final line with the last value of the iterable.
On Unix it i
Michael Janssen wrote:
On Mon, 31 Jan 2005 18:01:59 -0600, Victor Rex <[EMAIL PROTECTED]> wrote:
I played around with this output issue and I love the way it works.
Now, how do you do this in *nix? I tried the same approach and I get a
blank line for 5 seconds (or whatever number of cycles you h
On Mon, 31 Jan 2005 18:01:59 -0600, Victor Rex <[EMAIL PROTECTED]> wrote:
> I played around with this output issue and I love the way it works.
> Now, how do you do this in *nix? I tried the same approach and I get a
> blank line for 5 seconds (or whatever number of cycles you have on your
> examp
Victor Rex wrote:
I played around with this output issue and I love the way it works.
Now, how do you do this in *nix? I tried the same approach and I get a
blank line for 5 seconds (or whatever number of cycles you have on your
example) and the a final line with the last value of the iterable.
I
Orri Ganel wrote:
Jacob S. wrote:
Thanks Kent and Max!
Wow, I didn't know it did that. I'm too dumb to figure it out on my
own I guess...
Oh well! I found a cool new thing to play with at least!
Thanks,
Jacob
On Jan 30, 2005, at 02:40, Jacob S. wrote:
I don't think that's what he wants. I th
> print "Percent completed:" + str(percent) + "\r"
>
> Which should send me back to the beginning of the line and overwrite
it
> with a new line. But instead I get:
>
> Percent completed: 50
> Percent completed: 51
Print always adds a newline unless you put a comma at the end.
Unfortunately that
Jacob S. wrote:
Thanks Kent and Max!
Wow, I didn't know it did that. I'm too dumb to figure it out on my
own I guess...
Oh well! I found a cool new thing to play with at least!
Thanks,
Jacob
On Jan 30, 2005, at 02:40, Jacob S. wrote:
I don't think that's what he wants. I think he wants to *o
Thanks Kent and Max!
Wow, I didn't know it did that. I'm too dumb to figure it out on my own I
guess...
Oh well! I found a cool new thing to play with at least!
Thanks,
Jacob
On Jan 30, 2005, at 02:40, Jacob S. wrote:
I don't think that's what he wants. I think he wants to *overwrite*
what'
On Jan 30, 2005, at 02:40, Jacob S. wrote:
I don't think that's what he wants. I think he wants to *overwrite*
what's in the shell with new output.
For example.
so that the whole line is overwritten. In my experience, this is not
possible and if anyone can show me how to do it,
I would be gratef
It seems to work fine in Win2k command shell; try this:
>>> import time
>>> time.sleep(1)
>>> for i in range(9):
... print 'i is', i, '\r',
... time.sleep(1)
I get all the output on one line.
Kent
Jacob S. wrote:
I don't think that's what he wants. I think he wants to *overwrite*
what's i
I don't think that's what he wants. I think he wants to *overwrite* what's
in the shell with new output.
For example.
Python 2.4 (#Stuff)
...
Percent complete: 50
becomes...
Python2.4(#Stuff)
...
Percent complete: 51
so that the whole line is overwritten. In my experience, this is not
possible
On Jan 30, 2005, at 02:18, R. Alan Monroe wrote:
print "Percent completed:" + str(percent) + "\r"
Print forces a newline.
Try sys.stdout.write instead.
Alan
You can also use the following syntax:
>>> print "Percent completed:", str(percent), "\r",
The trailing comma is NOT a typo, it is inten
> print "Percent completed:" + str(percent) + "\r"
Print forces a newline.
Try sys.stdout.write instead.
Alan
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hello,
I'm trying to have a loop in a program print a message so I know it's
status. Right now I'm using
print "Percent completed:" + str(percent) + "\r"
Which should send me back to the beginning of the line and overwrite it
with a new line. But instead I get:
Percent completed: 50
Percent c
14 matches
Mail list logo