-
Notifications
You must be signed in to change notification settings - Fork 148
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
Jupyter Notebooks don't support Halo #32
Comments
@HBadertscher This is one feature I would love to include. I feel we would need to create a widget for jupyter notebook and ipython so that spinner renders as expected. I don't have experience with that, hence will take me a while to finalize the fix and get this working. If you would like to work on this, feel free to take this one up and I will assign it to you. |
Just adding here. If spinner is started in a cell in iPython and not stopped within the same cell, the spinner cannot be stopped. Need to explore this a little more. A widget might fix this. |
@manrajgrover Can I try to implement this feature? I don't have experience with ipython and jupyter widget too, but it's so interesting to work. refer |
@jungwinter sure! Please go ahead and give it a try. |
@manrajgrover I made prototype and can test in notebook.
I checked examples work fine, but not yet contain any jupyter test code. |
And when I run (halo-venv) halo git:feature-notebook ❯❯❯ pylint --errors-only --rcfile=/Users/WinterJ/Github/halo/.pylintrc --output-format=colorized halo
Traceback (most recent call last):
File "/Users/WinterJ/.pyenv/versions/halo-venv/bin/pylint", line 11, in <module>
sys.exit(run_pylint())
File "/Users/WinterJ/.pyenv/versions/3.6.1/envs/halo-venv/lib/python3.6/site-packages/pylint/__init__.py", line 13, in run_pylint
Run(sys.argv[1:])
File "/Users/WinterJ/.pyenv/versions/3.6.1/envs/halo-venv/lib/python3.6/site-packages/pylint/lint.py", line 1260, in __init__
'init-hook')))
File "/Users/WinterJ/.pyenv/versions/3.6.1/envs/halo-venv/lib/python3.6/site-packages/pylint/lint.py", line 1361, in cb_init_hook
exec(value) # pylint: disable=exec-used
File "<string>", line 8
ZGljdChfX2ZpbGVfXz1hY3RpdmF0ZV90aGlzKSkK'.decode('base64')
^
SyntaxError: invalid syntax |
@jungwinter This looks amazing! I'll have a look at the code soon. Regarding lint error, I'll have a look at it as well while going through your code. Could you please check if this works on |
@manrajgrover Thanks for reviewing! I checked |
@jungwinter I remember the issue with iPython. If a user does not handle keyboard interrupt and the spinner is running, a |
@manrajgrover Oh, I didn't check that issue. I worked a little to solve that problem. Please check my comment. #35 (comment) |
@jungwinter Please send a PR for this. I'll review the code. 😄 Thank you for working on this! |
Feature #32: Available Halo in jupyter notebook
This is fixed in #40 thanks to @jungwinter! This will be made available soon in next release. I need to do few fixes before making a release. |
While Halo works perfectly fine in the terminal, I can't get Halo to work inside a Jupyter notebook. I am running the following code in the first cell of the notebook:
The program runs through without any errors, but no spinner is shown at all.
I figured out, that if you write something to
stdout
withsys.stdout
prior to callingHalo
, then the spinner is shown, but each spinner and corresponding text are shown next to each other, i.e. clearing the current line doesn't work.returns the output
Is there something wrong on my end, and do you have an idea how to fix that?
It would be really nice if Halo worked with Jupyter too. Thanks for your efforts and for sharing this library!
The text was updated successfully, but these errors were encountered: