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

Add progress bar for notebooks #1078

Merged
merged 2 commits into from
Dec 20, 2019
Merged

Add progress bar for notebooks #1078

merged 2 commits into from
Dec 20, 2019

Conversation

ChristopherHogan
Copy link
Contributor

Unfortunately the idea of using _repr_markdown_ and __repr__ to adapt the display to notebooks and the terminal won't work because IPython will always call __repr__ in addition to _repr_markdown_. This PR adds a progress bar for notebooks, but still prints the same text it was printing before. It looks like this:

Screenshot from 2019-12-16 18-36-29

Including the text kind of defeats the purpose of the progress bar, but I'm not sure we can do much better until there is a reliable way to detect if we're running in a notebook.
@stevengj @oskooi

@stevengj
Copy link
Collaborator

Would be good to make this work in quiet mode, I think?

@stevengj stevengj merged commit a3b92bb into NanoComp:master Dec 20, 2019
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
* Add progress bar for notebooks

* Update progress bar in quiet mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants