From: Scott May <bscottmay@yahoo.com>
To: emacs-orgmode@gnu.org
Subject: [babel] Possible bug: (mis)handling tuples for :return value in Python [7.4 (release_7.4.153.ga0b8)]
Date: Thu, 24 Feb 2011 06:22:46 -0800 (PST) [thread overview]
Message-ID: <359245.93455.qm@web65609.mail.ac4.yahoo.com> (raw)
I do not think that =org-babel-read= is correctly handling Python
tuples that are returned from source blocks.
If I execute the following source block:
#+begin_src python :results value
return (1,2)
#+end_src
I get the following error message:
: Symbol's function definition is void: 1\,
The Python output for this source block is =(1,2)=, which =org-babel-read=
interprets as lisp and tries to eval.
I can work around the problem using either a Python list:
#+begin_src python :results value
return [1,2]
#+end_src
or by using =:results output=
#+begin_src python :results output :session
(1,2)
#+end_src
Regards,
Scott
Emacs : GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.21.6)
of 2010-09-01 on rhenium, modified by Debian
Package: Org-mode version 7.4 (release_7.4.529.gb23d)
next reply other threads:[~2011-02-24 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-24 14:22 Scott May [this message]
2011-02-27 21:30 ` [babel] Possible bug: (mis)handling tuples for :return value in Python [7.4 (release_7.4.153.ga0b8)] Eric Schulte
2011-02-28 13:22 ` Scott May
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=359245.93455.qm@web65609.mail.ac4.yahoo.com \
--to=bscottmay@yahoo.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).