Function: org-babel-python-table-or-string

org-babel-python-table-or-string is a byte-compiled function defined in ob-python.el.gz.

Signature

(org-babel-python-table-or-string RESULTS)

Documentation

Convert RESULTS into an appropriate elisp value.

If the results look like a list or tuple, then convert them into an Emacs-lisp table, otherwise return the results as a string.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-python.el.gz
(defun org-babel-python-table-or-string (results)
  "Convert RESULTS into an appropriate elisp value.
If the results look like a list or tuple, then convert them into an
Emacs-lisp table, otherwise return the results as a string."
  (let ((res (org-babel-script-escape results)))
    (if (listp res)
        (mapcar (lambda (el) (if (eq el 'None)
                                 org-babel-python-None-to el))
                res)
      res)))