Jack Kamm writes:
> Hi Christopher,
>
>> This might need to mentioned in Org manual and in ob-python.el source
>> code with comment. WDYT?
>
> The main documentation for this is in the Worg page for ob-python, in
> particular see the section "Return values":
>
> https://orgmode.org/worg/org-cont
Hi Christopher,
> This might need to mentioned in Org manual and in ob-python.el source
> code with comment. WDYT?
The main documentation for this is in the Worg page for ob-python, in
particular see the section "Return values":
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.
Thanks Jack. Confirmed works. This might need to mentioned in Org manual and in
ob-python.el source
code with comment. WDYT?
Jack Kamm writes:
> For non-session Python blocks, you need to use "return" on the value, as
> if you are in a function.
>
> The following works for me:
>
> #+begin_src
For non-session Python blocks, you need to use "return" on the value, as
if you are in a function.
The following works for me:
#+begin_src python :results value pp
dic = {'key1': 1, 'b': 2}
return dic
#+end_src
#+RESULTS:
: {'b': 2, 'key1': 1}
The bellowing python source block ~:results value pp~ does not print pprint
formated result as
expected. I tested with =$ emacs -q= confirmed this problem.
#+begin_src python :results value pp
dic = {'key1': 1, 'b': 2}
dic
#+end_src
#+RESULTS[(2021-12-29 10:51:14) b1011bfee8a1636204
"Christopher M. Miles" writes:
> [[PGP Signed Part:Undecided]]
>
> The bellowing python source block ~:results value pp~ does not print pprint
> formated result as
> expected. I tested with =$ emacs -q= confirmed this problem.
>
> #+begin_src python :results value pp
> dic = {'key1': 1, 'b'