Printing dots in sequence ('...')
Tim Williams
tim at tdw.net
Tue May 22 10:55:42 EDT 2007
On 22 May 2007 01:02:31 -0700, beertje <bjornkri at gmail.com> wrote:
> This is a very newbie question for my first post, perhaps
> appropriately.
>
> I want to print '....' gradually, as a progress indicator. I have a
> for-loop that every 10 steps executes:
> print '.',
>
> This results in something like 'Loading. . . .', whereas I want
> 'Loading....'
>
> A pet peeve, I can't for the life of me figure out how to get this
> desired output. How do I print dots - or anything for that matter - in
> sequence without a space being inserted in between?
>
maybe this: (on Win32, don't know about *nix)
for x in range(10):
print '.\b',
--
Tim Williams
More information about the Python-list
mailing list