From fc693eb5e2b895c7c1582446d9b6aa39ef64b837 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Fri, 19 Feb 2010 11:46:36 -0500 Subject: [PATCH] babel: treat python tuples as lists --- contrib/babel/lisp/langs/org-babel-python.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/babel/lisp/langs/org-babel-python.el b/contrib/babel/lisp/langs/org-babel-python.el index ad6859aef..aaf58a0a1 100644 --- a/contrib/babel/lisp/langs/org-babel-python.el +++ b/contrib/babel/lisp/langs/org-babel-python.el @@ -91,10 +91,11 @@ specifying a var of the same value." (format "%S" var))) (defun org-babel-python-table-or-string (results) - "If the results look like a table, then convert them into an + "If the results look like a list or tuple, then convert them into an Emacs-lisp table, otherwise return the results as a string." (org-babel-read - (if (string-match "^\\[.+\\]$" results) + (if (or (string-match "^\\[.+\\]$" results) + (string-match "^(.+)$" results)) (org-babel-read (replace-regexp-in-string "\\[" "(" (replace-regexp-in-string