Navigate Select ESC Close

Progress Bars in Python Terminal

2022-04-23 Science & Technology
110.6k
3.9k
148
NeuralNine
NeuralNine
470.0k subscribers

Unlock all features

FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.

Description

Today we learn how to create and display progress bars in the command line of a Python application. ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾ 📚 Programming Books & Merch 📚 🐍 The Python Bible Book: https://www.neuralnine.com/books/ 💻 The Algorithm Bible Book: https://www.neuralnine.com/books/ 👕 Programming Merch: https://www.neuralnine.com/shop 🌐 Social Media & Contact 🌐 📱 Website: https://www.neuralnine.com/ 📷 Instagram: https://www.instagram.com/neuralnine 🐦 Twitter: https://twitter.com/neuralnine 🤵 LinkedIn: https://www.linkedin.com/company/neuralnine/ 📁 GitHub: https://github.com/NeuralNine 🎙 Discord: https://discord.gg/JU4xr8U3dm 🎵 Outro Music From: https://www.bensound.com/

Top Comments (10)

@Sinke_100 2022-04-23

chr(9608) for filing bar and chr(9617) for blank

42 1 replies
@SirFloIII 2022-05-07

in python 3 the division int / int returns a float automatically. if you want integer division, you can use //.

23
@aeyyatal 2022-04-24

If you run it in PyCharm, in Run window, below the play icon is a cog icon -> under "execution" you can select "Emulate terminal in output console" . This will make the progressbar render properly (also realy usefull if you stuff from the rich libary).

21 1 replies
@carlosmspk 2022-05-12

If you clicked this video looking for an already made progress bar that you can use straight away, use the "tdqm" package. It's generic, lightweight, and very good for performance, and comes with time estimation by default!

6
@benlong1062 2022-04-24

That was fun to follow along with, somewhat simple (or at least not overly complicated), and the result looks great! Thanks!

6
@vest2240 2022-04-23

Had been looking for something like this for a while, your videos are awesome.

3
@michaelv6304 2022-11-15

All these years I never knew that print(..., end='\r') will actually do a carriage return to the same line in a Windows console, lol. THANKS!

2
@BlueberryCats_ 2022-05-13

That moment where i was thinking about this this morning, and now it’s top of my recommendation list .-.

1
@gunnargunaxe 2025-02-28

Thank you so much, man!🤝🏻 Now i can see progress of my work! I am using Thonny and it's works well!👍🏻

0
@BautyParra 2022-11-02

small video and to the point in a simple way, love it! Thanks for this

0

Unlock the Data Inside
Turn Videos into Knowledge

  • Get FREE 10/day: transcripts, summaries, chats
  • Chat with videos, export text & PDF
  • $1 free API credit for RAG, chatbots & research

Free forever plan • All features unlocked

App screenshot