ipython 5.0 console and --simple-prompt

346 views
Skip to first unread message

ssin...@coe.edu

unread,
Jul 15, 2016, 1:33:33 AM7/15/16
to Project Jupyter
Congrats and thanks for the new IPython release.

From the docs, IPython 5 has the option "--simple-prompt" to maintain compatibility with emacs. A quick test running 'ipython --simple-prompt' works fine from a terminal.

The emacs package ob-ipython.el uses jupyter messaging to run python code blocks from emacs. With IPython 4.x, emacs would fire up an IPython kernel using "ipython --existing", which, of course, is now deprecated.

I believe the command should now be  "jupyter console --existing", but I can't seem to pass --simple-prompt through jupyter to ipython (ZMQ throws an Unrecognized flag error). Is this the right approach?  Alternatively, is there a magic like %colors to get to the 'simple prompt'?

jupyter 4.1, ipython 5.0.0
https://github.com/gregsexton/ob-ipython

Thanks

Thomas Kluyver

unread,
Jul 15, 2016, 7:36:27 AM7/15/16
to Project Jupyter
On 15 July 2016 at 06:33, <ssin...@coe.edu> wrote:
From the docs, IPython 5 has the option "--simple-prompt" to maintain compatibility with emacs. A quick test running 'ipython --simple-prompt' works fine from a terminal.

The emacs package ob-ipython.el uses jupyter messaging to run python code blocks from emacs. With IPython 4.x, emacs would fire up an IPython kernel using "ipython --existing", which, of course, is now deprecated.

I believe the command should now be  "jupyter console --existing", but I can't seem to pass --simple-prompt through jupyter to ipython (ZMQ throws an Unrecognized flag error). Is this the right approach?  Alternatively, is there a magic like %colors to get to the 'simple prompt'?

If you're actually sending code to a running IPython kernel over zmq, without going through a terminal interface, you shouldn't need to worry about --simple-prompt. The changes to the terminal interface don't change how you talk to a kernel.

However, if you're sending stuff through a terminal interface such as Jupyter console, it may be an issue. Try with just 'jupyter console' first, and see if it works. If not, we may need to add the --simple-prompt flag to that as well:
https://github.com/jupyter/jupyter_console/issues/93

--simple-prompt was added primarily for Emacs 'inferior shell', which sort-of-but-not-really uses a terminal interface.

Thomas

ssin...@coe.edu

unread,
Jul 15, 2016, 11:09:38 AM7/15/16
to Project Jupyter

Looking at comment https://github.com/ipython/ipython/issues/9758, issue 93 could fix the problem I'm describing.  Thanks for considering it.

Steve

Thomas
Reply all
Reply to author
Forward
0 new messages