Skip to content
Python Question
Profile icon
GeoneveStudios

Python Question

I have a question. In Python how do you make a loading animation.

You are viewing a single comment. View All
Answered by 19wintersp [earned 5 cycles]
View Answer
Profile icon
awesomecds7

if you want to make one with graphics, you have to use a moudule called tkinter

import tkinter as tk from tkinter import * from tkinter.ttk import * ####LOADING SCREEN#### import time for i in range(3): ws = Tk() def step(): for i in range(37): ws.update_idletasks() pb1['value'] += random.choice(adl) time.sleep(random.choice(wl)) pb1.destroy() ws.destroy() pb1 = Progressbar(ws, orient=HORIZONTAL, length=379, mode='determinate') pb1.pack(expand=True) step()
Profile icon
awesomecds7

@awesomecds7 Please note that this will loop 3 times.