emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [babel][table] Passing argument to Python code block using org-sbe


From: Dror Atariah
Subject: [O] [babel][table] Passing argument to Python code block using org-sbe
Date: Fri, 12 Sep 2014 09:26:31 +0200

Consider the following code:

-------------------------------------------------8<--------------------------------------------------
#+NAME: test
#+BEGIN_SRC python :var x="foobar"
return len(x)
#+END_SRC
-------------------------------------------------8<--------------------------------------------------

It is possible to call this, as follows:

-------------------------------------------------8<--------------------------------------------------
#+CALL: test(x="fb")
-------------------------------------------------8<--------------------------------------------------

However, I fail to call this function and pass an argument to it when using org-sbe:
-------------------------------------------------8<--------------------------------------------------
| 6 | #ERROR |
#+TBLFM: @1$1='(org-sbe test)::@1$2='(org-sbe test (x ("fb")))
-------------------------------------------------8<--------------------------------------------------

I tried several possibilities, but nothing worked. Is it at all possible?

Thanks in advance,
Dror

PS: I posted also a SE question: http://stackoverflow.com/q/25789183/671013

reply via email to

[Prev in Thread] Current Thread [Next in Thread]