Share your repls and programming experiences

← Back to all posts
Cool Loading Bar (PYTHON)
[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!

Commentshotnewtop
Ov3R10rd (64)

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!

[deleted]

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

ARJPEG (150)

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
[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.

ARJPEG (150)

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

ps.
feel free to change the vars

[deleted]

@adityaru Oh, thanks so much! <3

Zexogon (874)

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

[deleted]

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

Zexogon (874)

@IreoluwaRaufu yea ikr extremly convienient

JordanDixon1 (372)

@Zexogon You could also:

import os
os.system('clear') #on linux
os.system('cls') #on windows
Zexogon (874)

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

def cls():
     os.system(‘cls’)
ebest (645)

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

LOL I just made it more useless

-Ebest

[deleted]

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

Bookie0 (4544)

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

ebest (645)

@Bookie0 CANNOT COMPUTE

SYSTEM RESTARTING

HYPR (6)

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

[deleted]

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

nt998302 (202)

@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!

Bookie0 (4544)

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!

AlexanderTarn (274)

make it go faster but add more stuff to load

[deleted]

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

Skied (0)

Absolutely stellar!
-Elon Tusk

JeremyIrwin (41)

Life changing! 11/10
-IGN