These are chat archives for ipython/ipython

2nd
Nov 2014
Andreas Klostermann
@akloster
Nov 02 2014 00:41
is there a way for a cell magic to change the lexer used for syntax highlighting? For example with %%coffeescript I'd like coffeescript syntax highlighting. It's ok if that's not possible, just asking...
Thomas Kluyver
@takluyver
Nov 02 2014 00:44
It should do that already, if there's a codemirror mode with the same name as the cell magic
Andreas Klostermann
@akloster
Nov 02 2014 00:49
sorry, I didn't know that
Thomas Kluyver
@takluyver
Nov 02 2014 00:53
that's OK
there's no need to apologise for not knowing stuff ;-)
epifanio
@epifanio
Nov 02 2014 01:04
Hi, can you help me with this error ? http://nbviewer.ipython.org/gist/epifanio/3d9d7d8e185536fe7178 I’m trying to pass 2 arrays (xs, ys) as input the a widget : interactive(solve_fourier, xs=xs, ys=ys, c_low=(0.0,1.0))
but that dosn’t seems to be the right way to do it
i was trying to avoid to load the data eveytime the parameter change
Thomas Kluyver
@takluyver
Nov 02 2014 01:09
You could just load them outside the function, and refer to them as globals rather than passing them in
or if you want them as parameters, use xs=fixed(xs), as shown in this example: http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Interactive%20Widgets/Image%20Processing.ipynb
epifanio
@epifanio
Nov 02 2014 01:15
thanks @takluyver working on it ! :)
epifanio
@epifanio
Nov 02 2014 01:35
works great!
Andreas Klostermann
@akloster
Nov 02 2014 01:46
I wrote a simple asset manager for the notebook: https://github.com/akloster/nb-assets
epifanio
@epifanio
Nov 02 2014 03:07
is it possible to have a widget parameter (like a drop down menu) that if a speciphic element is selected, will display additional widgets ?
the design is like : drpdown menu to select a type of smoother function
then based on the smoother selected, the widget displays the parameters used for the selected method