PDA

View Full Version : i should know how to do this but i cant?!?!



jimi_hendrix
December 19th, 2008, 02:26 AM
in a simple python script i want to have it print waiting... with increasing amount of periods... so its like this (but condensed into one line) where the waiting writes over each other so just the periods move

waiting
waiting.
waiting..
waiting...

and a 1 second pause in between

my problem is i cant figure out the pause without going onto multiple lines...

or i have a blur with the periods when i just do something like



while True:
print "waiting \r waiting. \r waiting.. \r waiting... \r"


so waht do i need?

ghostdog74
December 19th, 2008, 02:54 AM
put the word "waiting" before the loop. In the loop , print your dots, with the comma.


print "waiting"
while loop
print ".",

jimi_hendrix
December 19th, 2008, 02:56 AM
thank you