Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progressbar #10755

Merged
merged 7 commits into from Aug 26, 2017
Merged

Progressbar #10755

merged 7 commits into from Aug 26, 2017

Conversation

@mariusvniekerk
Copy link
Contributor

@mariusvniekerk mariusvniekerk commented Aug 26, 2017

This can be used from the notebook to do some simple progress information.

cc @rgbkrk

This can be used from  the notebook to do some simple progress information.
Parameters
----------
total : int
maximnum size of the progressbar
Copy link
Member

@rgbkrk rgbkrk Aug 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One lil' typo: maximum

Loading

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Aug 26, 2017

An example notebook would be great to have as well.

Loading

rgbkrk
rgbkrk approved these changes Aug 26, 2017
@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Aug 26, 2017

Can you add this to the whatsnew collection in here: https://github.com/ipython/ipython/tree/master/docs/source/whatsnew/pr

Loading

@rgbkrk rgbkrk merged commit 0a36ff7 into ipython:master Aug 26, 2017
4 checks passed
Loading
@rgbkrk rgbkrk added this to the 5.5 milestone Aug 26, 2017
@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Aug 26, 2017

@meeseeksdev backport

Loading

@meeseeksdev
Copy link
Contributor

@meeseeksdev meeseeksdev bot commented Aug 26, 2017

There seem to be a conflict, please backport manually

Loading

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Aug 26, 2017

No.

Loading

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Aug 26, 2017

@meeseeksdev backport

Loading

@meeseeksdev
Copy link
Contributor

@meeseeksdev meeseeksdev bot commented Aug 26, 2017

There seem to be a conflict, please backport manually

Loading

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Aug 26, 2017

😉

/cc @Carreau

Loading

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Aug 26, 2017

@meeseeksdev coffee please

Loading

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Aug 26, 2017

Loading

@Carreau Carreau self-assigned this Sep 12, 2017
@Carreau
Copy link
Member

@Carreau Carreau commented Sep 13, 2017

hum.. we should likely try to make it work better in the terminal as it does not erase the previous version of the progressbar, leading to a progress Triangle:

In [6]: pb = ProgressBar(100)
   ...: for i in range(25):
   ...:     pb.progress = i*4
   ...:
   ...:
[                                                            ] 0/100
[==                                                          ] 4/100
[====                                                        ] 8/100
[=======                                                     ] 12/100
[=========                                                   ] 16/100
[============                                                ] 20/100
[==============                                              ] 24/100
[================                                            ] 28/100
[===================                                         ] 32/100
[=====================                                       ] 36/100
[========================                                    ] 40/100
[==========================                                  ] 44/100
[============================                                ] 48/100
[===============================                             ] 52/100
[=================================                           ] 56/100
[====================================                        ] 60/100
[======================================                      ] 64/100
[========================================                    ] 68/100
[===========================================                 ] 72/100
[=============================================               ] 76/100
[================================================            ] 80/100
[==================================================          ] 84/100
[====================================================        ] 88/100
[=======================================================     ] 92/100
[=========================================================   ] 96/100

Loading

Carreau added a commit to Carreau/ipython that referenced this issue Sep 13, 2017
@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Sep 13, 2017

Oh hey, we better stick some \r in there.

Loading

@Carreau
Copy link
Member

@Carreau Carreau commented Sep 13, 2017

Loading

@Carreau
Copy link
Member

@Carreau Carreau commented Sep 13, 2017

Loading

@takluyver
Copy link
Member

@takluyver takluyver commented Sep 13, 2017

And if something else is displayed interleaved, printing with end='' will mean it's further messed up, unfortunately.

I think it might work to print with end='\r' - it shouldn't clear the line until more stuff is printed to overwrite it. Not 100% sure of that, though

Loading

Carreau added a commit that referenced this issue Sep 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants