Ihor Radchenko <yanta...@posteo.net> writes: > This is an ORG-NEWS entry for Version 9.4. Is it an intentional change?
Sorry, that was an accident. I've reverted it now: https://github.com/jackkamm/org-mode/commit/f12a695d67bc5c06013d9fbe0af844c9739e347a >> @@ -142,7 +144,9 @@ (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))) >> + (let ((res (if (string-equal "{" (substring results 0 1)) >> + results ;don't covert dicts to elisp >> + (org-babel-script-escape results)))) > > You may also need to update the docstring for > `org-babel-python-table-or-string' after this change. That change got reverted in subsequent update when I changed dict to return as table by default instead of string. So there's no need to update the docstring anymore. >> - body))) >> - (`value (let ((tmp-file (org-babel-temp-file "python-"))) >> + (if graphics-file >> + (format >> org-babel-python--output-graphics-wrapper >> + body graphics-file) >> + body)))) >> + (`value (let ((results-file (or graphics-file >> + (org-babel-temp-file "python-")))) > > What about :results graphics file ? Not entirely sure what you mean here. When ":results graphics file", then graphics-file will be non-nil -- org-babel-execute:python passes graphics-file onto org-babel-python-evaluate and then org-babel-python-evaluate-external-process. In case of ":results graphics file output", org-babel-python--output-graphics-wrapper is used to save pyplot.gcf(). Or if ":results graphics file value", then org-babel-python--def-format-value saves the result with Figure.savefig().