These are chat archives for ipython/ipython

26th
Sep 2014
Jason Grout
@jasongrout
Sep 26 2014 15:42
@minrk: I'm coming to that thinking too -- ipynb is just input and references to output, and the actual output (maybe anything but straight text/html?) is stored out of the file.
epifanio
@epifanio
Sep 26 2014 15:59
i’m tring to have the leaflet widget running, on my server didn’t worked so i was tring on my mac .. where i had an old version of ipython, trying to upgrade i’m having this error while installing a frsh clone from git : https://gist.github.com/e35dbcdd6ccfe9b01f73
which dependence is missing ?
oh, git submodule update didn’t worked while : python setup.py submodule did.
it build now
still has error trying to run the example notebook DrawControl.ipynb http://nbviewer.ipython.org/gist/anonymous/53c942f3b52e19325a85
Thomas Kluyver
@takluyver
Sep 26 2014 16:39
ping @ellisonbg - it looks like something may have got broken in leafletwidget
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:03
Did --gui=osx go away?
Thomas Kluyver
@takluyver
Sep 26 2014 17:07
I'm not aware that it did, but it was never there for me ;-)
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:07
Hmm this implies it hasn’t been there since 2011?! http://mail.scipy.org/pipermail/ipython-dev/2011-June/007820.html
How was it possibly working for me before?!
Thomas Kluyver
@takluyver
Sep 26 2014 17:11
What are you passing it to? Because the notebook used to pass through kernel arguments, it may have just been ignoring an argument it didn't recognise.
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:12
In emacs it would run ipython --gui=osx --matplotlib=osx --colors=Linux as the python interpreter
As of yesterday (mayber earlier?) that started causing emacs to hang when I opened a python file; when I run it on the command line it tells me osx isn’t an option anymore so I assume that’s the reason for the hang.
Thomas Kluyver
@takluyver
Sep 26 2014 17:13
I did change the GUI integration code recently, but I don't think I removed osx as an option
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:13
So it shouldn’t have been going through the notebook I don’t think
Thomas Kluyver
@takluyver
Sep 26 2014 17:13
let's find the PR
#5666
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:14
The matplotlib flag allows ipython to launch at least, but gives this warning: [TerminalIPythonApp] WARNING | GUI event loop or pylab initialization failed UsageError: Invalid GUI request 'osx', valid ones are: wx, gtk, qt, tk, qt5, gtk3, pyglet, glut
Cool thanks
it was a no-op, presumably left there for backwards compatibility
and it got lost in my cleanup
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:16
Ah ok
Maybe it would be good to put it back in, and have it display a warning, and then finally remove it fully a release after that?
Thomas Kluyver
@takluyver
Sep 26 2014 17:17
is this part of some emacs package, or just your own config?
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:17
Or just give a more informative error (osx is not supported, you don’t need it)
My config
My emacs config is moderately popular though, so may cause problems for other people too
Thomas Kluyver
@takluyver
Sep 26 2014 17:20
I think having a cycle with some kind of warning makes sense, if you want to make a PR
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:20
Sure
Thomas Kluyver
@takluyver
Sep 26 2014 17:20
and obviously remove it from your config
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:21
Yes :)
Because I don’t have a linux system with recent ipython at the moment, this should still be fine on linux, right? ”ipython --gui=wx --matplotlib=wx --colors=Linux”
(Er, because I don’t have a system I can’t test that, but you are running linux so you probably know :))
Thomas Kluyver
@takluyver
Sep 26 2014 17:23
if you have wx installed, yes
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:23
Cool
Thomas Kluyver
@takluyver
Sep 26 2014 17:24
my ipython command launches on Python 3, and wx for Python 3 is still pre-release, so I don't have it handy
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:24
Ah ok
Thomas Kluyver
@takluyver
Sep 26 2014 17:24
but if I replace it with ipython2, that works
Jessica B. Hamrick
@jhamrick
Sep 26 2014 17:24
Great
Thanks!
Thomas Kluyver
@takluyver
Sep 26 2014 17:25
no worries :)
Jason Grout
@jasongrout
Sep 26 2014 17:36
@jdfreder: I think we should distinguish between visibility: hidden and display: none
right now, visible=False means display: none.
If it weren't for backwards compatibility, I'd do visibility=None -> display: none and visibility=False -> visibility:hidden
Jason Grout
@jasongrout
Sep 26 2014 17:43
what do you think?
Jessica B. Hamrick
@jhamrick
Sep 26 2014 18:04
@minrk re: your comment on 5666, if the osx backend does still need to work for matplotlib, then it probably shouldn’t actually display a deprecation warning, right? it should just silently do nothing?
Thomas Kluyver
@takluyver
Sep 26 2014 18:08
@jhamrick yes
I think he's just working on that
Jessica B. Hamrick
@jhamrick
Sep 26 2014 18:08
Oh ok
Min RK
@minrk
Sep 26 2014 18:19
It would only make sense to display a deprecation for --gui osx (which is always redundant with --matplotlib osx), since it doesn't do anything.
but since matplotlib osx should work, and it calls gui osx, it's simpler to just put back the no-op gui osx than to deprecate gui osx and find a way for matplotlib osx to avoid calling the deprecated method.
Sylvain Corlay
@SylvainCorlay
Sep 26 2014 18:22
@takluyver Actually, in Scipy, we had a discussion on this second type of persistence with @ellisonbg and @jdfreder . We had a proposal that is a bit orthogonal to the current discussion, but I recall the Jon was not convinced by it.
I can detail it if you think that this should be part of the discussion.
Thomas Kluyver
@takluyver
Sep 26 2014 18:23
sorry, which type - the one I was describing to Jon on here yesterday, or the one you outlined in the PR comments just now?
Sylvain Corlay
@SylvainCorlay
Sep 26 2014 18:24
None of those :)
The first one is the one proposed by Jon in his current PR.
Min RK
@minrk
Sep 26 2014 18:24
@jhamrick @takluyver #6555
Sylvain Corlay
@SylvainCorlay
Sep 26 2014 18:25
The one that I am talking about is a way to solve the issue that you mentioned about the input of a user in a widget.
Thomas Kluyver
@takluyver
Sep 26 2014 18:32
(PR #6555 fixes a bug introduced by #5666. Neat)
aha
Jessica B. Hamrick
@jhamrick
Sep 26 2014 18:32
Hah! I didn’t notice that
Thomas Kluyver
@takluyver
Sep 26 2014 18:32
@SylvainCorlay is it possible to give me a brief rundown of what it involves?
Sylvain Corlay
@SylvainCorlay
Sep 26 2014 18:34
Here is the idea. Have an event full property tree (dicts and list) reflect the state of a user-controlled data store.
store = session.dataStore()                                                                       # dataStore() return an object unique to the session, which is stored in the metadata
initial_text_value = store.get('widget_caption', 'Enter Text Here')   
widget = Text(value = initial_text_value)
dlink((widget, 'value'), (store, 'widget_caption'))
display(widget)
the datastore would need to have an API compatible with traitlets, but extensible - adding new attributes
This guy would be in the input part of the notebook format.
even if widget is recreated with a new id everytime the cell is ran, the text value is persistent.
Thomas Kluyver
@takluyver
Sep 26 2014 18:36
hmmm, interesting
and the code you showed would be in the kernel? Or the notebook server?
Sylvain Corlay
@SylvainCorlay
Sep 26 2014 18:37
in the kernel
Thomas Kluyver
@takluyver
Sep 26 2014 18:37
mhm
Sylvain Corlay
@SylvainCorlay
Sep 26 2014 18:37
this is user code
Thomas Kluyver
@takluyver
Sep 26 2014 18:38
and how would the datastore get between that and the notebook document?
Sylvain Corlay
@SylvainCorlay
Sep 26 2014 18:38
it would even make sense that the state of the datastore would be editable in the gui.
the datastore is actually in the notebook js object.
Thomas Kluyver
@takluyver
Sep 26 2014 18:39
I see, and when you do a store.get(), it queries the JS for that value
Sylvain Corlay
@SylvainCorlay
Sep 26 2014 18:39
yes
it is like a widget but unique to the notebook / zmqshell session
keys are set by the user. it is like a variable name to them.
Jason Grout
@jasongrout
Sep 26 2014 18:41
an interesting thing would be to "bookmark" different session states (i.e., serialize and load this store multiple times)
Thomas Kluyver
@takluyver
Sep 26 2014 18:41
I think I follow, thanks for filling me in. I'm not entirely convinced, but it has some interesting elements.
Sylvain Corlay
@SylvainCorlay
Sep 26 2014 18:42
I am not sure myself. I was trying to hack this last summer and got lost in translation in how you implemented traitlets. It should be easier with the eventful dict.
(I wanted to make a kind of extensible HasTraits instance)
Now that I have written this down, I should probably paste this in the discussion on the link so that it does not get lost.
Thomas Kluyver
@takluyver
Sep 26 2014 18:45
yes, that's a good idea
Sylvain Corlay
@SylvainCorlay
Sep 26 2014 18:49
btw, you noticed the "dlink" :)
Widgets and datastore lie on the js side. It is natural to use the js link.
copied this in the PR's comment -- persisting the persistence :)
Jason Grout
@jasongrout
Sep 26 2014 18:53
Sylvain, you sure are persistent about bringing up this topic!
:)
Sylvain Corlay
@SylvainCorlay
Sep 26 2014 18:54
yes, I was actually typing that
Brian E. Granger
@ellisonbg
Sep 26 2014 19:42
I just opened a PR on ipython-in-depth that updates the examples to latest master
But I also created a 2.x tag so folks can use it for 2.x tutorials
But maybe I should also create a 2.x branch as well
Thomas Kluyver
@takluyver
Sep 26 2014 20:04
a branch seems more appropriate, in case it changes in the future
a branch is effectively just a tag that is automatically updated when you commit with it checked out
Jessica B. Hamrick
@jhamrick
Sep 26 2014 23:46
When I open a notebook in python 3 that had previously been used with a python 2 kernel, I get a “dead kernel” error. It should throw an error, because it can’t find the python 2 kernel type, but it seems odd that the error says the kernel died — because there was no kernel previously running. Is this intentional?
Thomas Kluyver
@takluyver
Sep 26 2014 23:57
@jhamrick no, that's not intentional
Jessica B. Hamrick
@jhamrick
Sep 26 2014 23:58
Ok, I’ll open an issue about it
Thomas Kluyver
@takluyver
Sep 26 2014 23:58
I just haven't got round to making it behave nicely on loading a notebook with a kernel that it doesn't know about
Jessica B. Hamrick
@jhamrick
Sep 26 2014 23:58
Ah, got it
Thomas Kluyver
@takluyver
Sep 26 2014 23:58
if you want to look into it... ;-)
in the meantime, ipython2 kernelspec install-self should tell it about the Python 2 kernel