mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-02-01 20:54:25 +00:00
babel: treat python tuples as lists
This commit is contained in:
parent
a95c05773e
commit
fc693eb5e2
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user