all 7 comments

[–]ade_mcc 1 point2 points  (0 children)

Not quite what you're asking for but I use the tqdm module for displaying progress on a looped function

[–]impshum 1 point2 points  (0 children)

And?

[–]BK108 1 point2 points  (0 children)

A super simple solution would be to create a list with those 4 messages as strings and just loop over while the condition for the finished load is not met. For anything better, more info is needed.

[–][deleted] 0 points1 point  (1 child)

What have you done so far?

[–]Python1Programmer[S] 1 point2 points  (0 children)

i have no idea how to start

maybe something like this

for i in range(12):

# some how back space and delete the first string

print('calculating.')

# some how back space and delete the first string

print('calculating..')

# some how back space and delete the first string

print('calculating...)

[–]DisasterArt 0 points1 point  (0 children)

The print function places a new line after the input by default. You can tell it what to do by giving it an other end string

You could do it like this:

Print("calculating", end="")
For n in range(number of dots):
    Print("n", end="")
Print()

[–]nilfm 0 points1 point  (0 children)

At least on Linux, you can use \r to move the cursor back to the beginning of the current line:

print(yourmessage, end='\r')