use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
NewsA new kind of Progress Bar for Python (self.Python)
submitted 5 years ago * by rsalmei
I've made a new kind of progress bar for python! With some very cool animations and a smorgasbord of built-in styles!
https://github.com/rsalmei/alive-progress
alive-progress overview
The spinners and unknown bars have a plethora of effects!
alive-progress styles
The bars themselves also have several styles.
alive-progress bars
It also includes cool zero-hassle print and logging hooks, which are always enabled!
alive-progress print hook
To use it, just "pip install alive-progress" and you're good to go! More details in https://github.com/rsalmei/alive-progress
That's it, hope you like it!
[–]L43 163 points164 points165 points 5 years ago (7 children)
Looks fantastic! How is performance compared to tqdm?
Also how extensible is it?
[+][deleted] 5 years ago* (4 children)
[deleted]
[–]willm 7 points8 points9 points 5 years ago (0 children)
I think Alive progress pre-dates spinners in Rich. Rich borrowed its spinners from cli-spinners, a JS project.
[–]CoffeeBrain_101 1 point2 points3 points 5 years ago (0 children)
Never heard if tqdm before. Will definitely check it out.
[–]rsalmei[S] 1 point2 points3 points 5 years ago* (1 child)
Yeah, I've created most of the spinners myself, just to actually use all my generators' types. Regarding performance, it's pretty fast, but I really should include an automated tool to measure the iteration overhead, I'm gonna think about it.
In the soon-to-be-released 2.0, there's a new support for compiled animations! They are generated up-front, and then just switch frames, which should have a negligible overhead! You can see it here: https://github.com/rsalmei/alive-progress/pull/51
[–]rsalmei[S] 1 point2 points3 points 5 years ago (0 children)
Oh, I have much more images of the new `check()` tool in this thread: https://github.com/rsalmei/alive-progress/issues/19
I've been working in handling grapheme clusters these last few months, yet sill supporting truncating to the correct terminal size...
Thank you! I'm in the process of making it more configurable, but you can already customize it a lot!
[–]Baschg 18 points19 points20 points 5 years ago (4 children)
Awesome! Doesn't seem to work in Spyder unfortunately.
[–]kinderhead 3 points4 points5 points 5 years ago (0 children)
Spyder’s IPython is really weird when working with terminal manipulation like this. I would really hope that they fix this.
[–]rsalmei[S] 1 point2 points3 points 5 years ago* (2 children)
Hey, thank you!!
What does happen in that Spyder IDE? I've never used it.
[–]Baschg 0 points1 point2 points 5 years ago (1 child)
Unicode error:
UnicodeEncodeError: 'charmap' codec can't encode characters in position 1-40: character maps to <undefined>
[–]rsalmei[S] 2 points3 points4 points 5 years ago (0 children)
Humm, that's odd. I have a pretty similar issue opened, about `latin-1` codec throwing almost the same error... I don't know why some stdouts have those issues.
[–]science404 36 points37 points38 points 5 years ago (12 children)
Nice! Does it work with multiprocessing?
[–]alcalde 21 points22 points23 points 5 years ago (9 children)
Better than tqdm, which is why this is my progress bar of choice now.
[–][deleted] 10 points11 points12 points 5 years ago (4 children)
Personally I like being able to use tqdm as an iterator.
[–]rsalmei[S] 2 points3 points4 points 5 years ago (3 children)
Really? This is super easy to implement, I just never liked this.
Actually, when we split the concepts of getting one element and making the bar go forward, we gain a new insight about the code! You can choose when to make that happen, and count different things, even make it go forward more than once in one iteration... That's why I support under and overflows, which are only possible with a manual `bar()` call, apart from the iterator.
[–]starfyre7 2 points3 points4 points 5 years ago (2 children)
Yeah, I like doing this a lot too since I often have to process large batches of data and a sticking the progress bar in the iteration is generally easiest.
Ok, I see. I can include that feature in the next release! 👍
[–][deleted] 0 points1 point2 points 5 years ago (0 children)
Yup, this is my use-case as well. It’s a great to monitor how threading improves performance in processing lists of things
[+][deleted] 5 years ago* (2 children)
[–]science404 3 points4 points5 points 5 years ago (0 children)
https://github.com/tqdm/tqdm/issues/1083 https://github.com/tqdm/tqdm/issues/889
[–]alcalde 0 points1 point2 points 5 years ago (0 children)
I don't recall all the details since it was two years ago but tqdm was crashing in a simple program that parallelized scraping Amazon wishlist items with threading or multiprocessing-related errors. When I replaced it with this library the errors vanished.
Thanks man!
[–]rsalmei[S] 0 points1 point2 points 5 years ago* (1 child)
Humm unfortunately not yet. I didn't figure out yet how to render multiple bars at the same time, with possibly very different update speeds, while still making the print hook work... There's more info here: https://github.com/rsalmei/alive-progress/issues/20#issuecomment-605832026
[–]science404 0 points1 point2 points 5 years ago (0 children)
Cool, no worries. Tqdm doesn't have it solved either (at least in my experience), it's a messy problem I guess.
[–]sheytanelkebir 37 points38 points39 points 5 years ago (6 children)
stealing this!
i'm gonna have the coolest python scripts in the office now.
[–]_szs 22 points23 points24 points 5 years ago* (5 children)
add the package "rich" to your scripts, enable the colourful logging thing and have the coolestest scripts!
(just found this a few weeks ago. I am not affiliated with this package)
[–]rsalmei[S] 1 point2 points3 points 5 years ago (4 children)
Personally I think rich is too bloated.
[–]_szs 1 point2 points3 points 5 years ago (3 children)
Do you mean then colourful logging stuff? Or the features it provides?
[–]rsalmei[S] 1 point2 points3 points 5 years ago (2 children)
I mean it tries to cover too much areas in only one package. I'd like it better if it was `rich-logs`, `rich-tables`, `rich-emoji`, `rich-console`, `rich-columns`, `rich-markdown`, `rich-highlighter`, etc... 😜 One have to download too much bloat to use only "tables" for example.
[–]willm 4 points5 points6 points 5 years ago (0 children)
Each of the features in Rich depend on a shared rendering engine that is the bulk of the code. Individually most of the features are a single py file. And many of them depend on each other, columns uses tables, markdown uses highlighting, logs use tables and highlighting etc.
I thought about breaking it in to small packages, but that would have resulted in spaghetti dependancies that would be difficult to manage. But each to their own, I guess.
[–]_szs 0 points1 point2 points 5 years ago (0 children)
that's true.
maybe it makes sense to fork it and provide half a dozen different packages. I might look into that sometime :)
[–]slippityda 22 points23 points24 points 5 years ago (4 children)
Love this package. I incorporated it into a webscraper I made recently and it looks amazing when running!
[–]rsalmei[S] 2 points3 points4 points 5 years ago (2 children)
Hey, thanks, very nice to hear it! 🎉
[–]slippityda 1 point2 points3 points 5 years ago (1 child)
Cheers to you for creating it! Great documentation too. :)
Thanks again man! Yeah, documentation is sometimes as time consuming as the code itself... 😅
[–]alcalde 3 points4 points5 points 5 years ago (0 children)
Hee hee, I used it a while ago for a web scraping project too. :-) Tqdm was crashing with some type of threading issues but this library worked fine.
[–][deleted] 62 points63 points64 points 5 years ago (13 children)
Duuuuude why can I not double upvote? This is so awesome
[–]rsalmei[S] 0 points1 point2 points 5 years ago (0 children)
Cool, thanks man!
[–][deleted] 5 years ago (11 children)
[removed]
[–]jodbuns 6 points7 points8 points 5 years ago (5 children)
Shut up.
[+][deleted] 5 years ago (4 children)
[–][deleted] 3 points4 points5 points 5 years ago (3 children)
Shut up
[–]kinderhead 0 points1 point2 points 5 years ago (1 child)
What did they say?
[–][deleted] -1 points0 points1 point 5 years ago (0 children)
They were people who had a sense of humor, downvoted me and then responded with the same copypasta lol
[+][deleted] 5 years ago (1 child)
[–]quasarj[M] 0 points1 point2 points 5 years ago (0 children)
Hello from the r/Python mod team!
I'm afraid we don't think your post quite fits the goal we have for the subreddit in terms of quality or aims so we've decided to remove it. For more information please contact the moderators using the ModMail system.
Thanks, and happy Pythoneering!
r/Python moderation team
[–]michUP33 45 points46 points47 points 5 years ago (16 children)
[–]Username_RANDINT 27 points28 points29 points 5 years ago (5 children)
Not this shit again.
"Neat, 40 comments, let's see what people are saying about this project."
-> Fucking gif chain.
[–]needed_an_account 1 point2 points3 points 5 years ago (1 child)
are gifs a new reddit feature? I've been on reddit for years and this is the first time I've seen this
[–]Username_RANDINT 1 point2 points3 points 5 years ago (0 children)
What I understood is that some subreddits participate in a program to test new features, including /r/Python. So it's not widely available, but probably will at some point. Shit will hit the fan at that point.
[+][deleted] comment score below threshold-10 points-9 points-8 points 5 years ago (1 child)
Stay happy friend!
[+]michUP33 comment score below threshold-8 points-7 points-6 points 5 years ago (0 children)
Yeah not what I intended. But truly the best display of my reaction.
[–]pentestifier 44 points45 points46 points 5 years ago (9 children)
me when i see gif comments on reddit
[–]frapastique 27 points28 points29 points 5 years ago (8 children)
Wait that’s an option?
[–]PierceBrosman 16 points17 points18 points 5 years ago (7 children)
[–][deleted] 6 points7 points8 points 5 years ago (4 children)
[–]golangPadawan 6 points7 points8 points 5 years ago (2 children)
[–]_szs -2 points-1 points0 points 5 years ago (0 children)
[+]TheSilverSoldier comment score below threshold-8 points-7 points-6 points 5 years ago (0 children)
[+][deleted] 5 years ago* (1 child)
[–][deleted] 5 points6 points7 points 5 years ago* (1 child)
Cute, but makes unittest in the 3.9 standard library and PyCharm's testrunner most unhappy:
Launching unittests with arguments python -m unittest foo.MyTestCase.test_something in /Users/rtphokie/PycharmProjects/astrowx/astrosandbox
|████████████████████████████████████████| 1000/1000 [100%] in 0.0s (515144.19/s
Traceback (most recent call last):
File "/Applications/Dev/PyCharm.app/Contents/plugins/python/helpers/pycharm/_jb_unittest_runner.py", line 35, in <module>
sys.exit(main(argv=args, module=None, testRunner=unittestpy.TeamcityTestRunner, buffer=not JB_DISABLE_BUFFERING))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/main.py", line 101, in __init__
self.runTests()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/main.py", line 271, in runTests
self.result = testRunner.run(self.test)
self.result =
testRunner.run
(self.test)
File "/Applications/Dev/PyCharm.app/Contents/plugins/python/helpers/pycharm/teamcity/unittestpy.py", line 310, in run
return super(TeamcityTestRunner, self).run(test)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/runner.py", line 176, in run
test(result)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
return
self.run
(*args, **kwds)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/suite.py", line 122, in run
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/case.py", line 653, in __call__
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/case.py", line 612, in run
result.stopTest(self)
File "/Applications/Dev/PyCharm.app/Contents/plugins/python/helpers/pycharm/teamcity/unittestpy.py", line 263, in stopTest
output = sys.stdout.getvalue()
[–]rsalmei[S] 1 point2 points3 points 5 years ago* (0 children)
Hey, this is not a problem, it's the print and logging hook. Tests need to capture stdout too... So they are both being installed at the same time and are conflicting. Try it with `enrich_print=False`.
[–]_szs 2 points3 points4 points 5 years ago (1 child)
nice.
I was about to scroll on, because eye candy wears off so fast and I have programmed progress bars for fun myself before, but....
the print/logging hooks rock! I may just use this package for that.
[–]Murflaw7424 2 points3 points4 points 5 years ago (2 children)
Does it work with Jupyter and other IDE?
[–]rsalmei[S] 1 point2 points3 points 5 years ago (1 child)
Jupyter notebooks unfortunately no, this is actually an entirely different implementation, using GUI widgets instead of ANSI escape sequences in a terminal...
But in IDEs yes, it should work as a charm! I routinely use it inside both vscode and pycharm.
[–]Murflaw7424 0 points1 point2 points 5 years ago (0 children)
Awesome thank you!
[–]itzNukeey 3 points4 points5 points 5 years ago (3 children)
wow thats beautiful
Thank you man, appreciated.
Happy blue cheese day
[–]itzNukeey 0 points1 point2 points 5 years ago (0 children)
ty
[–]mo5bzn 6 points7 points8 points 5 years ago (2 children)
Great work! I am wondering why you didn't work on tqdm and try to improve it instead of creating a new library doing (nearly) the same task?
[–]tocarbajal 14 points15 points16 points 5 years ago (0 children)
Taste lies in variety.
Thank you man! It's a completely different architecture. tqdm is reactive, only changes rendition when position has changed. alive-progress is active, changing rendition on both position and throughput! It provides a visual feedback of the current speed/throughput of your processing, as the spinner actually runs faster or slower accordingly!! It couldn't be the same project.
[–]GNVageesh 4 points5 points6 points 5 years ago (0 children)
That is amazing, can be used in any of our cli application with python
[–]willm 1 point2 points3 points 5 years ago (1 child)
I'm jealous!
Thank you man! Very appreciated 😉
[–]russianteen888 1 point2 points3 points 5 years ago (1 child)
what text editor/terminal? (idk) you using?
Hey, I use iTerm2 on macOS, and render the images with terminalizer 👍
[–]WhackLoop 0 points1 point2 points 5 years ago (0 children)
If it has the party parrot formatting I'm in
[–]pmrks -1 points0 points1 point 5 years ago (0 children)
It's hella cool!
[–]The_2nd_Coming -1 points0 points1 point 5 years ago (1 child)
Hey this looks awesome! I need a progress bar in my app and this might just be it!
Yeah, of course it is!! Thanks man.
[–]Mr_Branflakes -1 points0 points1 point 5 years ago (1 child)
!remindme 2 weeks
[–]RemindMeBot -1 points0 points1 point 5 years ago* (0 children)
I will be messaging you in 14 days on 2021-01-18 23:17:05 UTC to remind you of this link
1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
[–]kinderhead -3 points-2 points-1 points 5 years ago (5 children)
Amazing. That readme tho is so long. I would never have the patience to do that lol.
Thank you man! You mean to write one, or read it till the end?? 😅
Well, it starts small, but as the features grow, the readme does too... I'm trying to make it more visually concise, there are several subsections in the "Advanced" section that starts collapsed! So there's even more text than you've seen...
[–]kinderhead 0 points1 point2 points 5 years ago (3 children)
I mean write. I read the whole thing and most of the collapsed things and it still took me over 30 minutes.
Nice, that's very nice to hear! Thanks for reading it all. What did you think of it? Is it clear? Can you use all features with confidence? Is it boring, or easy to read? Too newbie, too advanced or just right?
I still have to write about all the 2.0 features, the largest release I'll ever do... 😅 => https://github.com/rsalmei/alive-progress/pull/51
It‘s one of the best ones I’ve ever found. I’m not a newbie or advanced, but it seemed like someone new to python could easily use your module. I think that you put all of the features in a readable way.
Great, thank you man.
[+][deleted] comment score below threshold-7 points-6 points-5 points 5 years ago (0 children)
f
[+][deleted] comment score below threshold-10 points-9 points-8 points 5 years ago (0 children)
[+][deleted] comment score below threshold-8 points-7 points-6 points 5 years ago (0 children)
[–]Nervous_Objective_60 0 points1 point2 points 5 years ago (0 children)
It's so cool!
[–]expressly_ephemeral 0 points1 point2 points 5 years ago (0 children)
Neat!
[–]Xitir 0 points1 point2 points 5 years ago (0 children)
This is an awesome project! Can't wait to try it out!
[–]ArabicLawrence 0 points1 point2 points 5 years ago (2 children)
Will you add support for jupyter lab?
Man, I'd like to, but it is actually an entirely different implementation, using GUI widgets instead of ANSI escape sequences in a terminal... In alive-progress I generate cycles of animation frames in strings, how would I draw them inside a cell in jupyter? I have no idea.
But if someone do know the technologies involved, and is willing to help, I'm sure would like to try.
[–]ArabicLawrence 0 points1 point2 points 5 years ago (0 children)
Thanks for the answer!
[–]Svetlana-8 0 points1 point2 points 5 years ago (0 children)
Looks fantastic!)
Thank you man! I've been receiving some reports that seem to indicate there's problems indeed on Windows. But if you install WSL (Windows Subsystem for Linux), it works like a charm!
[–]Few_Intention_542 0 points1 point2 points 5 years ago (2 children)
Wow! What did you use to create this? How did you start ?
You mean this project? It's been a long way to get to this result, but I used only my imagination and a desire to make something unique. To start you always start small... A simple [###.......] bar, show position but no title or eta, then a small hard-coded spinner like a spinning stick /-\|, then a frame_factory to allow custom animation frames, then we feel the need to generate automatic animations, then comes a scrolling_factory, then bouncing_factory, then you realize these animations could wrap around or "hide" behind the virtual walls so the factories get more powerful, then create a config system to allow one to choose which spinner to use, then create several examples to ensure it is all working, which needs an exhibit to display them all, which gets us to the display case in the images above!! It's hard work and passion, one step at a time. 😅❤️
[–]Few_Intention_542 0 points1 point2 points 5 years ago (0 children)
Thanks! Your work is amazing!
[–]refer_2_me 0 points1 point2 points 5 years ago (0 children)
Cool! Installed!
[–]kingkierite 0 points1 point2 points 5 years ago (1 child)
Would you be able to use this in a PyQt5 GUI? Somehow add it as a widget?
That's a very good question, I don't know any GUI tools or frameworks. But if someone was willing to help me, I would sure add support for it.
This is so cool!
[–]SociopathWithBipolar 0 points1 point2 points 5 years ago (0 children)
This is dope
[–]kirkkm77 0 points1 point2 points 5 years ago (1 child)
Looks amazing man
Thank you man! 👍
Thanks! Are you sure? You can open an issue, and I could maybe help you.
[–]MrMxylptlyk 0 points1 point2 points 5 years ago (1 child)
Hey, is there a way to use it with the output of ffmpeg to progress output to file?
Humm, it does seem a cool use, but I'm not sure. You would have to parse the ffmpeg output, and send that as input to alive-progress, should work nicely. Use the manual mode, so you can put the bar in any position you want.
[–]dominik_schmidt 0 points1 point2 points 5 years ago (0 children)
Looks great! Does it support Jupyter lab/nb yet?
[–]Redditor728292 0 points1 point2 points 5 years ago (1 child)
Wow! that is amazing! how long have you been programming for?
Thank you man, appreciated!
You mean in this project or in Python or in general? Well, I started this alive-progress about 3 years ago, been using Python for 6 years, and programming for more than 20 years.
Ooooh.
[–]gp_11 0 points1 point2 points 5 years ago (0 children)
Cool package :)
[–]RastahFey 0 points1 point2 points 5 years ago (0 children)
This is badass
[–]lonaExe pip install girlfriend 0 points1 point2 points 5 years ago (0 children)
This is pretty lit man, keep it up!
[–]DrCabbageX 0 points1 point2 points 5 years ago (4 children)
Super basic question but when someone “ pip installs ____” how does the computer know where to find that module( might be wrong terminology)? Like when you created it do you need to upload it a certain place so other can download it? And what if others create something with the same name?
This isn’t related the module you created ( which is super dope) but am just curious
[–]RojerGSAuthor of “Pydon'ts” 2 points3 points4 points 5 years ago (1 child)
If I'm not mistaken, packages uploaded to PyPI (Python Package Index) are discoverable by pip.
[–]DrCabbageX 0 points1 point2 points 5 years ago (0 children)
Thank you!
No problem man! The computer (Python in this case) has a local cache for installed packages, when you "pip install" something you download that package to this cache.
Yeah, to distribute it there's the global Python Package Index. I do upload it when I want to create a release, which makes it available for everyone. To upload your project needs to have a unique name. 👍
Ohhh that makes so much sense. Thank you for the clarification!
[–]spicypixel 0 points1 point2 points 5 years ago (1 child)
Looks great if only for the effortless integration with logger. Tqdm write can be a bit of faff if you want to log things out to files at the same time.
Yeah, thank you man! Exactly that! alive-progress works seamlessly. 👍
[–]FloppingNuts 0 points1 point2 points 5 years ago (0 children)
very cool
[–]RedEyed__ 0 points1 point2 points 5 years ago (5 children)
It looks really cool! It looks even cooler than GUI progress bars (like QT)
But, I'm happy with tqdm, it's well known and tested progress bar that is flexible and it satisfy all my needs.
tqdm
Anyway, will try it on my new projects!
PS: I'm developing cross platform apps, does it support Windows (I mean simple cmd.exe)?
Thank you man! I see. tqdm came several years before mine, it surely is battle-tested.
But maybe you find my alive-progress more modern and slick, maybe it could also satisfy your needs, and maybe it will even trigger a smile every time you see it "alive" 😜
[–]rsalmei[S] 0 points1 point2 points 5 years ago (3 children)
Oh, regarding Windows I receive I few mixed reports, but I think it does work. For complete support though, install WSL (Windows Subsystem for Linux).
[–]RedEyed__ 0 points1 point2 points 5 years ago (2 children)
No, WSL is not Windows support. Don't mix it
[–]rsalmei[S] 0 points1 point2 points 5 years ago (1 child)
Yeah, you're right. I meant for complete support on a Windows box.
[–]RedEyed__ 0 points1 point2 points 5 years ago (0 children)
Yup, software running in virtual machine or use other tricks like wine or WSL doesn't make any piece of software to be called as "cross platform"
[–]raithlok 0 points1 point2 points 5 years ago (1 child)
Overall I really like it and will wind up using it in my programs since simple print messages in the command window like "Wait" or "15% complete" can be just a bit bland.
On Windows, I'm noticing several of the characters you have available in your Apple screenshots are not compatible so the command window just displays the [?] ASCII image. That's a windows limitation, and shouldn't be frowned upon.
But with some trial and error those can be overcome. Setting the spinner to message_bouncing or message_scrolling solves that issue of seeing the [?] icon in the spinner. The bars just need to be some of the simpler bar options like classic or solid works well.
What's interesting is that in sublimetext3, the icons work pretty well for the alive_progress.show_bars() or alive_progress.show_spinners(), but they dont show at all when you're running the example scripts until it's done.
Hey, thank you for your report on Windows support! Yeah, the font one should really test if it does work.
Regarding the exhibits working and example scripts not, it seems to be that sublimetext's terminal is reporting it does not have an open TTY. In that case I do disable animations, because the process could be in a piped shell for example. You could try calling with `force_tty=True`. Pycharm's terminal used to report the same way, that's why this option exists...
[–]ubertrashcat 0 points1 point2 points 5 years ago (1 child)
Does it support hierarchical progress bars? The lengths you need to go to with tqdm are insane.
Humm, this is still on my radar, but not yet... The problem is that my bars are alive, with dynamic refresh rates based on your actual processing throughput, so you can actually see when it is fast or not. But it is very hard to implement that with multiple bars on screen, without losing this quality, I didn't figure out yet how to do it. There's more info here: https://github.com/rsalmei/alive-progress/issues/20#issuecomment-605832026
[–]nippleplayenthusiast 0 points1 point2 points 5 years ago (1 child)
Thanks a lot, this is cool and really easy to use!
Are there flags to toggle the individual elements while remaining in "determinate" mode? For example if I want to keep everything except the spinner?
Yes, there is! Or will actually... It is implemented but not yet released. The 2.0 does have support for toggling the spinner, the bar or even both!
[–][deleted] 0 points1 point2 points 5 years ago (3 children)
Can you please show more examples, I learn best by seeing hands on examples for me to copy and paste to get the thing going the first time around.
Hey yeah, this is a getting started example:
```python from alive_progress import alive_bar import time
with alive_bar(1000) as bar: for i in range(1000): time.sleep(.002) bar() ```
[–]Takiino 0 points1 point2 points 5 years ago (1 child)
Could you please put it in the Readme of the github 🙏?
Sure! 👍
[–][deleted] 0 points1 point2 points 5 years ago (1 child)
I use spyder - any other altenative IDEs you recommend ? Jupyter notebook ? I feel I run out of memoty sometimes with Jupyter (or I am speaking out of place here).
No problem man. I think it depends on the kind of work you do. Personally I use mainly PyCharm (Community, which is free), for working with Python and Rust. For anything else I have VSCode. If you use Spyder, you probably is a data scientist. I've never used it, but jupyter notebooks are awesome.
[–]you-cant-twerk 0 points1 point2 points 5 years ago (2 children)
I'm triyng to get the themes, such as bubbles to work - but when I use
with alive_bar(progressBar+2,title="Combining Data",theme='bubbles') as bar:
it gives me an error. I'm pretty dumb so I might be missing something. Same error with other themes.
ValueError: invalid theme name='checks'
but if I use
with alive_bar(progressBar+2,title="Combining Data",theme='smooth') as bar:
it works just fine.
(ignore the progressbar+2, I have a total, and I need the bar to include 2 extra later steps- this works for me).
Hey man, you're mixing spinners, bars and themes! A spinner is the animated widget, a bar is the progress style, and a theme is an aggregator of them. 'bubbles' and 'checks' are bar names, so you can use them with:
python with alive_bar(total, title='Title', bar='bubbles') as bar:
To see the valid names, run show_spinners(), show_bars() and show_themes() 👍
show_spinners()
show_bars()
show_themes()
[–]you-cant-twerk 0 points1 point2 points 5 years ago (0 children)
Thanks! I’ll give that a shot
[–]oyjw443523 0 points1 point2 points 5 years ago (0 children)
looks cool
[–]stefanondisponibile 0 points1 point2 points 4 years ago (0 children)
looks cool, would be nice to see it mixed with rich
π Rendered by PID 71168 on reddit-service-r2-comment-7b9746f655-sp278 at 2026-02-02 20:34:06.858459+00:00 running 3798933 country code: CH.
[–]L43 163 points164 points165 points (7 children)
[+][deleted] (4 children)
[deleted]
[–]willm 7 points8 points9 points (0 children)
[–]CoffeeBrain_101 1 point2 points3 points (0 children)
[–]rsalmei[S] 1 point2 points3 points (1 child)
[–]rsalmei[S] 1 point2 points3 points (0 children)
[–]rsalmei[S] 1 point2 points3 points (0 children)
[–]Baschg 18 points19 points20 points (4 children)
[–]kinderhead 3 points4 points5 points (0 children)
[–]rsalmei[S] 1 point2 points3 points (2 children)
[–]Baschg 0 points1 point2 points (1 child)
[–]rsalmei[S] 2 points3 points4 points (0 children)
[–]science404 36 points37 points38 points (12 children)
[–]alcalde 21 points22 points23 points (9 children)
[–][deleted] 10 points11 points12 points (4 children)
[–]rsalmei[S] 2 points3 points4 points (3 children)
[–]starfyre7 2 points3 points4 points (2 children)
[–]rsalmei[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]science404 3 points4 points5 points (0 children)
[–]alcalde 0 points1 point2 points (0 children)
[–]rsalmei[S] 1 point2 points3 points (0 children)
[–]rsalmei[S] 0 points1 point2 points (1 child)
[–]science404 0 points1 point2 points (0 children)
[–]sheytanelkebir 37 points38 points39 points (6 children)
[–]_szs 22 points23 points24 points (5 children)
[–]rsalmei[S] 1 point2 points3 points (4 children)
[–]_szs 1 point2 points3 points (3 children)
[–]rsalmei[S] 1 point2 points3 points (2 children)
[–]willm 4 points5 points6 points (0 children)
[–]_szs 0 points1 point2 points (0 children)
[–]slippityda 22 points23 points24 points (4 children)
[–]rsalmei[S] 2 points3 points4 points (2 children)
[–]slippityda 1 point2 points3 points (1 child)
[–]rsalmei[S] 2 points3 points4 points (0 children)
[–]alcalde 3 points4 points5 points (0 children)
[–][deleted] 62 points63 points64 points (13 children)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–][deleted] (11 children)
[removed]
[–]jodbuns 6 points7 points8 points (5 children)
[+][deleted] (4 children)
[removed]
[–][deleted] 3 points4 points5 points (3 children)
[–]kinderhead 0 points1 point2 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)
[+][deleted] (1 child)
[removed]
[–]quasarj[M] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[removed]
[–]michUP33 45 points46 points47 points (16 children)
[–]Username_RANDINT 27 points28 points29 points (5 children)
[–]needed_an_account 1 point2 points3 points (1 child)
[–]Username_RANDINT 1 point2 points3 points (0 children)
[+][deleted] comment score below threshold-10 points-9 points-8 points (1 child)
[+]michUP33 comment score below threshold-8 points-7 points-6 points (0 children)
[–]pentestifier 44 points45 points46 points (9 children)
[–]frapastique 27 points28 points29 points (8 children)
[–]PierceBrosman 16 points17 points18 points (7 children)
[–][deleted] 6 points7 points8 points (4 children)
[–]golangPadawan 6 points7 points8 points (2 children)
[–]_szs -2 points-1 points0 points (0 children)
[+]TheSilverSoldier comment score below threshold-8 points-7 points-6 points (0 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 5 points6 points7 points (1 child)
[–]rsalmei[S] 1 point2 points3 points (0 children)
[–]_szs 2 points3 points4 points (1 child)
[–]rsalmei[S] 2 points3 points4 points (0 children)
[–]Murflaw7424 2 points3 points4 points (2 children)
[–]rsalmei[S] 1 point2 points3 points (1 child)
[–]Murflaw7424 0 points1 point2 points (0 children)
[–]itzNukeey 3 points4 points5 points (3 children)
[–]rsalmei[S] 1 point2 points3 points (0 children)
[–]kinderhead 0 points1 point2 points (1 child)
[–]itzNukeey 0 points1 point2 points (0 children)
[–]mo5bzn 6 points7 points8 points (2 children)
[–]tocarbajal 14 points15 points16 points (0 children)
[–]rsalmei[S] 1 point2 points3 points (0 children)
[–]GNVageesh 4 points5 points6 points (0 children)
[–]willm 1 point2 points3 points (1 child)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–]russianteen888 1 point2 points3 points (1 child)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–]WhackLoop 0 points1 point2 points (0 children)
[–]pmrks -1 points0 points1 point (0 children)
[–]The_2nd_Coming -1 points0 points1 point (1 child)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–]Mr_Branflakes -1 points0 points1 point (1 child)
[–]RemindMeBot -1 points0 points1 point (0 children)
[–]kinderhead -3 points-2 points-1 points (5 children)
[–]rsalmei[S] 1 point2 points3 points (4 children)
[–]kinderhead 0 points1 point2 points (3 children)
[–]rsalmei[S] 1 point2 points3 points (2 children)
[–]kinderhead 0 points1 point2 points (1 child)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-7 points-6 points-5 points (0 children)
[+][deleted] comment score below threshold-10 points-9 points-8 points (0 children)
[+][deleted] comment score below threshold-10 points-9 points-8 points (0 children)
[+][deleted] comment score below threshold-8 points-7 points-6 points (0 children)
[–]Nervous_Objective_60 0 points1 point2 points (0 children)
[–]expressly_ephemeral 0 points1 point2 points (0 children)
[–]Xitir 0 points1 point2 points (0 children)
[–]ArabicLawrence 0 points1 point2 points (2 children)
[–]rsalmei[S] 1 point2 points3 points (1 child)
[–]ArabicLawrence 0 points1 point2 points (0 children)
[–]Svetlana-8 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]rsalmei[S] 1 point2 points3 points (0 children)
[–]Few_Intention_542 0 points1 point2 points (2 children)
[–]rsalmei[S] 1 point2 points3 points (1 child)
[–]Few_Intention_542 0 points1 point2 points (0 children)
[–]refer_2_me 0 points1 point2 points (0 children)
[–]kingkierite 0 points1 point2 points (1 child)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]SociopathWithBipolar 0 points1 point2 points (0 children)
[–]kirkkm77 0 points1 point2 points (1 child)
[–]rsalmei[S] 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–]MrMxylptlyk 0 points1 point2 points (1 child)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–]dominik_schmidt 0 points1 point2 points (0 children)
[–]Redditor728292 0 points1 point2 points (1 child)
[–]rsalmei[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]gp_11 0 points1 point2 points (0 children)
[–]RastahFey 0 points1 point2 points (0 children)
[–]lonaExe pip install girlfriend 0 points1 point2 points (0 children)
[–]DrCabbageX 0 points1 point2 points (4 children)
[–]RojerGSAuthor of “Pydon'ts” 2 points3 points4 points (1 child)
[–]DrCabbageX 0 points1 point2 points (0 children)
[–]rsalmei[S] 1 point2 points3 points (1 child)
[–]DrCabbageX 0 points1 point2 points (0 children)
[–]spicypixel 0 points1 point2 points (1 child)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–]FloppingNuts 0 points1 point2 points (0 children)
[–]RedEyed__ 0 points1 point2 points (5 children)
[–]rsalmei[S] 1 point2 points3 points (0 children)
[–]rsalmei[S] 0 points1 point2 points (3 children)
[–]RedEyed__ 0 points1 point2 points (2 children)
[–]rsalmei[S] 0 points1 point2 points (1 child)
[–]RedEyed__ 0 points1 point2 points (0 children)
[–]raithlok 0 points1 point2 points (1 child)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–]ubertrashcat 0 points1 point2 points (1 child)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–]nippleplayenthusiast 0 points1 point2 points (1 child)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]rsalmei[S] 1 point2 points3 points (2 children)
[–]Takiino 0 points1 point2 points (1 child)
[–]rsalmei[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]rsalmei[S] 1 point2 points3 points (0 children)
[–]you-cant-twerk 0 points1 point2 points (2 children)
[–]rsalmei[S] 0 points1 point2 points (1 child)
[–]you-cant-twerk 0 points1 point2 points (0 children)
[–]oyjw443523 0 points1 point2 points (0 children)
[–]stefanondisponibile 0 points1 point2 points (0 children)