You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why does ipython notebook output shows everything? #16
I can't but notice that when each cell in ipython notebook produces output, it includes the whole code as well.
For example, look at the picture. It shows the method definition as well. clearly I don't need it as I've already wrote it. So, is there a way so that it would NOT show the method definition as well?
Also, the Jshell only shows Added method twice(String). So, can the output of ipython be manipulated? If so, how? (I don't know how to write ipython kernels)
So there is no design reason the whole code shows again.
Though I'll admit I don't actually know too much about making ipython kernels either :-P. This was basically the result of an experiment where I took the WrapperKernel example and wrapped around the java 9 repel jar. Then @dsblank found the repo and added all sorts of fanciness to it.
If you (or whoever else) takes a shot at this you are going to have to be careful and make sure whatever method is used to separate redundant output from useful output generalizes nicely
also @dsblank nice! Its super cool that this thing is being used to some capacity! I am sure when Java 9 is further along or out in the wild tools like this will get a lot better.
Activity
Bachmann1234 commentedon Apr 17, 2016
So there is no design reason the whole code shows again.
Though I'll admit I don't actually know too much about making ipython kernels either :-P. This was basically the result of an experiment where I took the WrapperKernel example and wrapped around the java 9 repel jar. Then @dsblank found the repo and added all sorts of fanciness to it.
You can take the output and separate useful output from useless output This is the function that returns the output to be displayed
If you (or whoever else) takes a shot at this you are going to have to be careful and make sure whatever method is used to separate redundant output from useful output generalizes nicely
Bachmann1234 commentedon Apr 17, 2016
As for why this behavior is this way:
Basically I did the simplest thing that worked. I was mostly toying around with java9 and ipython.
shubhashis-k commentedon Apr 17, 2016
Thanks for pointing to the function :).
dsblank commentedon Apr 17, 2016
I've further refined the output to not print everything, but this can get complicated because kulla formats it (wraps). Here is some sample output:
https://athena.brynmawr.edu/jupyter/hub/dblank/public/CS206%20Data%20Structures/2016-Spring/Notebooks/LinkedListSummary.ipynb
Note also that the results are shown in the Out: area. It isn't correct yet... and the Java parser is really slow!
shubhashis-k commentedon Apr 17, 2016
Yes, noticed the slow outputs. Also, does the code completion work? Pressing tab does not suggest anything for me.
Bachmann1234 commentedon Apr 17, 2016
I doubt it. I think I would have to write something lower level then the wrapper kernel to do that. I could be wrong though.
Bachmann1234 commentedon Apr 17, 2016
also @dsblank nice! Its super cool that this thing is being used to some capacity! I am sure when Java 9 is further along or out in the wild tools like this will get a lot better.
dsblank commentedon Apr 17, 2016
Yes, when Java9 gets more stable, it will be nice.
BTW, I have hooked up basic command completions on class names, and variables.
Bachmann1234 commentedon Apr 17, 2016
Heh, shows what I know :-P
shubhashis-k commentedon Apr 17, 2016
@dsblank how did you manipulate the output? Also is there a documentation on manipulating the ipython outputs?
dsblank commentedon Apr 17, 2016
I had to custom handle it... it is a bit of a hack right now. Basically, something like:
When the semester is over and I have some time, I'll make a real fix, and a PR.
dsblank commentedon Apr 17, 2016
The completions:
shubhashis-k commentedon Apr 17, 2016
Thanks @dsblank :)