emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Babel python question: use of ipython and %cpaste
@ 2013-12-03  6:08 Arun Persaud
  2013-12-03 11:44 ` Rasmus
  2013-12-03 12:48 ` Andreas Röhler
  0 siblings, 2 replies; 4+ messages in thread
From: Arun Persaud @ 2013-12-03  6:08 UTC (permalink / raw)
  To: emacs-orgmode

Hi

being able to use python as a source block is great, but I often stumble
over the fact that when using sessions you have to treat empty lines in
a special way (i.e. as the end of an indentation block).

I was wondering if it would be easy to create an ipython mode, something
like

#+BEGIN_SRC ipython ...

where the content for a session is copied over to an ipython buffer
using the ipython magic %cpaste. This way empty lines should be treated
correctly.

It would also have the nice side effect of giving access to other magic
commands within org-babel, such as %timeit or profiling.

Unfortunately, I don't know how to modify ob-python.el to achieve this.
Apart from setting py-shell, I'm not sure how to copy the body of the
source block over to use %cpaste and also how to create a trigger for
BEGIN_SRC ipython...

Would this work? Any idea on how to implement this?

Thanks

Arun

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-03 20:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-03  6:08 Babel python question: use of ipython and %cpaste Arun Persaud
2013-12-03 11:44 ` Rasmus
2013-12-03 20:35   ` Arun Persaud
2013-12-03 12:48 ` Andreas Röhler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).