[IPython-dev] Possible to run Octave in IPython without %%octave ?

Daniel Carrera dcarrera at gmail.com
Sun Oct 19 06:30:55 EDT 2014


Hmm... I need help with IOctave... maybe I found a bug in IPython 3. I
installed IPython 3 from Git like the instructions say, and then I
installed IOctave.

---------------------------------------------
$ python --version
Python 2.7.6
$
$ git clone --recursive https://github.com/ipython/ipython.git
$ cd ipython
$ pip install -e ".[notebook]" --user
$ sudo python setup.py install
$
$ ipython --version
3.0.0-dev
$
$ cd ../octave_kernel
$ sudo python setup.py instal
---------------------------------------------

If I try to start the notebook, it says that --kernel is not recognized.

---------------------------------------------
$ ipython notebook --kernel octave
... several lines of output ...
[C 141019 12:20:20 application:77] Bad config encountered during
initialization:
[C 141019 12:20:20 application:78] Unrecognized flag: '--kernel'
---------------------------------------------


But if I try the same with the Qt console, there is no complaint about
--kernel and the console seems to load fine. Instead, I get an error when I
type '2+2'.

---------------------------------------------
$ ipython qtconsole --kernel octave
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.
...skip...
To connect another client to this kernel, use:
    --existing kernel-28223.json
---------------------------------------------
(I type 2+2 in the console and press Enter)
---------------------------------------------
Traceback (most recent call last):
  File
"/home/sigrid/Daniel/Teaching/MATLAB-2014/ipython/IPython/qt/base_frontend_mixin.py",
line 138, in _dispatch
    handler(msg)
  File
"/home/sigrid/Daniel/Teaching/MATLAB-2014/ipython/IPython/qt/console/frontend_widget.py",
line 537, in _handle_stream
    self.append_stream(msg['content']['text'])
KeyError: 'text'

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev at scipy.org

You can print a more detailed traceback right now with "%tb", or use
"%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    c.Application.verbose_crash=True
---------------------------------------------

Help?

Cheers,
Daniel.



On 19 October 2014 11:10, Matthias Bussonnier <bussonniermatthias at gmail.com>
wrote:

> Hi Daniel,
>
> Le 19 oct. 2014 à 10:16, Daniel Carrera <dcarrera at gmail.com> a écrit :
>
> Hello,
>
> I teach a very short course on MATLAB for astronomy students (6 hours).
> This year I am thinking of replacing my usual Impress slides with an
> IPython notebook running Octave. Yesterday I got Octave running in IPython
> and it seems to work.
>
> Is it possible to make an IPython profile that loads oct2py and treats
> every cell as if it had "%%octave -f svg" on the first line?
>
>
> I would suggest looking at IOctave (Octave Kernel of IPython)
>
> https://github.com/blink1073/octave_kernel
>
> And generally look as
> https://github.com/ipython/ipython/wiki/Projects-using-IPython
>
> This isn't a critical issue, but I think the notebook would look nicer
> this way. The students will not use the notebook themselves. This is just
> to to make my presentation a little more lively instead of just showing
> static code on a slide.
>
>
> I would suggest having a look at Damian Avila Live reveal mode also to do
> your presentation:
>
> https://github.com/damianavila/live_reveal
>
> Cheers,
> --
> Matthias
>
>
>
>
> Cheers,
> Daniel.
> --
> When an engineer says that something can't be done, it's a code phrase
> that means it's not fun to do.
>  _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
When an engineer says that something can't be done, it's a code phrase that
means it's not fun to do.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141019/83f598ff/attachment.html>


More information about the IPython-dev mailing list