babel: fixed bug in org-babel-expand-body:python

This commit is contained in:
Eric Schulte 2010-04-20 00:18:03 -06:00
parent 9ff31a5110
commit 0917218da5
1 changed files with 8 additions and 8 deletions

View File

@ -37,14 +37,14 @@
(add-to-list 'org-babel-tangle-langs '("python" "py" "#!/usr/bin/env python"))
(defun org-babel-expand-body:python (body params &optional processed-params)
(let (vars (second (or processed-params (org-babel-process-params params))))
(concat
(mapconcat ;; define any variables
(lambda (pair)
(format "%s=%s"
(car pair)
(org-babel-python-var-to-python (cdr pair))))
vars "\n") "\n" (org-babel-trim body) "\n")))
(concat
(mapconcat ;; define any variables
(lambda (pair)
(format "%s=%s"
(car pair)
(org-babel-python-var-to-python (cdr pair))))
(second (or processed-params (org-babel-process-params params))) "\n")
"\n" (org-babel-trim body) "\n"))
(defun org-babel-execute:python (body params)
"Execute a block of Python code with org-babel. This function is