Skip to content
Sign upLog in
← Back to Community
Cool Loading Bar (PYTHON)
Profile icon
[deleted]

This Python code runs a cool looking loading bar in the console. It has no purpose though, except for looking cool and wasting your time. Enjoy!

Voters
Profile icon
Adulayy
Profile icon
kingbobby
Profile icon
dimodino
Profile icon
KPKri
Profile icon
jsunnyca2
Profile icon
frissyn
Profile icon
IsaiahFranco
Profile icon
MrMinimax
Profile icon
Dude20121
Profile icon
qkasriel
Comments
hotnewtop
Profile icon
Ov3R10rd

That is really cool! Good job!

As an idea, you should just put this into start of a game for absolutely no reason. 10/10!

Profile icon
[deleted]

@Ov3R10rd
Thanks, will do! \(0.0)/

Profile icon
ARJPEG

You could use a module called "tqdm"

The way you would use it would be something like:

from tdqm import tdqm for i in tqdm(range(somevalue)): your code
Profile icon
[deleted]

@adityaru
Yeah, I came across something like that at Stack Overflow, but I'm not too sure how it works. I'll look into it.

Profile icon
ARJPEG

@IreoluwaRaufu
Here, I made an example for you to experiment - https://repl.it/@adityaru/Tdqm-Example

ps.
feel free to change the vars

Profile icon
[deleted]

@adityaru
Oh, thanks so much! <3

Profile icon
ARJPEG

@IreoluwaRaufu
No Problem! :P

Profile icon
Dart

If you import from replit import clear
Then you can just use clear() to clear the terminal

Profile icon
[deleted]

@Zexogon
Oh, that's cool I didn't know repl.it had their own module! I'll do that in other projects

Profile icon
Dart

@IreoluwaRaufu
yea ikr extremly convienient

Profile icon
JordanDixon1

@Zexogon
You could also:

import os os.system('clear') #on linux os.system('cls') #on windows
Profile icon
Dart

@JordanDixon1
if you want the fastest way you could always create the function with

def cls(): os.system(‘cls’)
Profile icon
ebest

https://repl.it/@ebest/loading

LOL I just made it more useless

-Ebest

Profile icon
[deleted]

@ebest
Lol, it's an infinite loop of useless loading.

Profile icon
Bookie0

Wow

@ebest
that system overloading and restarting was a nice touch if humor!

Profile icon
ebest

@Bookie0
CANNOT COMPUTE

SYSTEM RESTARTING

Profile icon
Bookie0

[email protected]
Have a nice day!

Profile icon
HYPR

I'm new to Python so I think this is really cool! Good job. (I also wanna learn JavaScript)

Profile icon
[deleted]

@HYPR
Thanks, I'm sure you can learn quickly! :)

Profile icon
AphixDev

@HYPR
Python's a great place to start! I started with HTML but my transition to game dev with ue4 was inspired by Python. Eventually, I learned C++ because I realized how widespread it is. Good Luck with the coding adventures that await you!

Profile icon
PaytonTheMartian

nice

Profile icon
Bookie0

Is it me, or is this Aesthetically Pleasing?!

Also please check out my new repl: The Most Simplest Program

Thanks and have a great day!

Profile icon
BMinor

Cool!

Profile icon
eco27

reminds me of npm kinda

Profile icon
kingretracted
Profile icon
AphixDev

Sweet! :)

Profile icon
WendeBH

mad ting

Profile icon
AlexanderTarn

make it go faster but add more stuff to load

Profile icon
[deleted]

@AlexanderTarn
Thanks, will add a way for the user to change the length of the loading bar and stuff. \(^.^)/

Profile icon
Skied

Absolutely stellar!
-Elon Tusk

Profile icon
Dart

:^3

Profile icon
[deleted]
Profile icon
[deleted]
Profile icon
JeremyIrwin

Life changing! 11/10
-IGN