These are chat archives for ipython/ipython

15th
Sep 2015
Mark Ebersole
@mebersole
Sep 15 2015 01:29
any around? I'm having problems with some custom.js code (I didn't write it). If fails on CodeMirror.requireMode saying "CodeMirror.requireMode is not a function"
if I remove that code block (it's loading the lua mode), it works fine
this is 3.2.1
Min RK
@minrk
Sep 15 2015 07:37
@mebersole it may need the right require call to load the modules properly.
@jasongrout I did a quick profile, and it seems like it's spending ~all that startup time importing. I'm not sure how much less we can import.
gitgit137
@gitgit137
Sep 15 2015 11:42

HI, I am looking at Perez' intro talk. He is talking about running OS shell commands from notebook.
He is doing:
myfiles=!ls
!echo $myfiles

I am on windows and I try this:
myfiles=!dir
!echo %myfiles%

Doesn't work. Any suggestions?

Min RK
@minrk
Sep 15 2015 11:56
And what if you do !echo $myfiles?
gitgit137
@gitgit137
Sep 15 2015 12:50
@minrk get an error - "The system cannot find the file specified."
Min RK
@minrk
Sep 15 2015 12:50
ah, echo probably doesn't exist on Windows.
Try running a Windows command
gitgit137
@gitgit137
Sep 15 2015 13:17
sorry, echo is a standard windows command
Min RK
@minrk
Sep 15 2015 13:19
Does !echo 'hi' work?
Jason Grout
@jasongrout
Sep 15 2015 14:11
@aburgm, see @minrk's work above. @minrk, @aburgm was the one working on the startup time.
I think you both came to the same conclusion
Once when we were discussing slow startup time for Sage, we came to the conclusion that it had to do with a huge number of stat calls and lookups for files that didn't exist
We discussed at that time making a file cache (which we could easier for Sage, since often the distribution didn't change)
Steven Silvester
@blink1073
Sep 15 2015 14:13
Yikes:
>>> len(list(sys.modules.keys())
... )
51
>>> import IPython
>>> len(list(sys.modules.keys()))
339
Jason Grout
@jasongrout
Sep 15 2015 14:14
we also wrote some lazy importers, etc.
so we didn't have to pay the import cost up front
Steven Silvester
@blink1073
Sep 15 2015 14:15
>>> from IPython import kernel
/Users/ssilvester/anaconda/lib/python3.4/site-packages/IPython/kernel/__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated. You should import from ipykernel or jupyter_client instead.
  "You should import from ipykernel or jupyter_client instead.", ShimWarning)
>>> len(list(sys.modules.keys()))
474
Jason Grout
@jasongrout
Sep 15 2015 14:18
>>> len(list(sys.modules.keys()))
43
>>> import ipykernel
>>> len(list(sys.modules.keys()))
779
>>> len(list(sys.modules.keys()))
43
>>> import numpy
>>> len(list(sys.modules.keys()))
201
>>> import scipy
>>> len(list(sys.modules.keys()))
215
>>> import matplotlib
>>> len(list(sys.modules.keys()))
263
>>> import pandas
>>> len(list(sys.modules.keys()))
752
looks like importing scipy, numpy, matplotlib, and pandas (the heavyweight import-wise) is still less than IPython
Sylvain Corlay
@SylvainCorlay
Sep 15 2015 18:11
This message was deleted
The traitlet API issue gathering the different changes that happened and have been proposed : ipython/traitlets#48
I have been keeping it up to date.
Feedback welcome.
Sylvain Corlay
@SylvainCorlay
Sep 15 2015 18:25
The last item is about how we could enable eventful lists and dicts in the future, with other descriptors, but still using the @observe decorator and trait notification mechanism.
Another question is whether we should use the **change signature for change handlers, or pass the change dictionary.
Anton Akhmerov
@akhmerov
Sep 15 2015 19:20
I've been wondering: exactly all open slides-related issues in jupyter/nbconvert are due to css/js conflicts. Why is there a need to ship jupyter js/css along with slides?
The disadvantage of providing a clean slides export is that the result looks less like a notebook and more like a presentation. The advantage is that the result looks less like a notebook and more like a presentation, and also everything works.
@damianavila am I missing something here?
Anton Akhmerov
@akhmerov
Sep 15 2015 19:47
NB: all the closed issues have the same origin.
Denis Akhiyarov
@denfromufa
Sep 15 2015 23:33
how can I fix unsigned message error for custom kernels installed using kernelspec?
Denis Akhiyarov
@denfromufa
Sep 15 2015 23:44
answered, see google group