Am 24.03.2013 19:41, schrieb Nick Dokos:



running into this, func def seems missing:



Debugger entered--Lisp error: (void-function org-babel-result-cond)
  (org-babel-result-cond result-params results 
(org-babel-python-table-or-string results))
  (if (string= (substring org-babel-python-eoe-indicator 1 -1) results) nil 
(org-babel-result-cond result-params results (org-babel-python-table-or-string 
results)))
  (unless (string= (substring org-babel-python-eoe-indicator 1 -1) results) 
(org-babel-result-cond result-params results (org-babel-python-table-or-string 
results)))
(lambda (results) (unless (string= (substring org-babel-python-eoe-indicator 1 -1) results) (org-babel-result-cond result-params results (org-babel-python-table-or-string results))))("Traceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\nNameError: name 'foo' is not defined\nbye") (let* ((send-wait (lambda nil (comint-send-input nil t) (sleep-for 0 5))) (dump-last-value (lambda (tmp-file pp) (mapc (lambda (statement) (insert statement) (funcall send-wait)) (if pp (list "import pprint" (format "open('%s', 'w').write(pprint.pformat(_))" ...)) (list (format "open('%s', 'w').write(str(_))" ...)))))) (input-body (lambda (body) (mapc (lambda (line) (insert line) (funcall send-wait)) (split-string body "[ \n]")) (funcall send-wait)))) ((lambda (results) (unless (string= (substring org-babel-python-eoe-indicator 1 -1) results) (org-babel-result-cond result-params results (org-babel-python-table-or-string results)))) (case result-type (output (mapconcat (function org-babel-trim) (butlast (org-babel-comint-with-output (session org-babel-python-eoe-indicator t body) (funcall input-body body) (funcall send-wait) (funcall send-wait) (insert org-babel-python-eoe-indicator) (funcall send-wait)) 2) "\n")) (value (let ((tmp-file (org-babel-temp-file "python-"))) (org-babel-comint-with-output (session org-babel-python-eoe-indicator nil body) (let (...) (funcall input-body body) (funcall dump-last-value tmp-file ...) (funcall send-wait) (funcall send-wait) (insert org-babel-python-eoe-indicator) (funcall send-wait))) (org-babel-eval-read-file tmp-file))))))
  org-babel-python-evaluate-session(#<buffer *Python*> "print(foo(100)) \nprint \"bye\"" output 
("output" "replace"))
  (if session (org-babel-python-evaluate-session session body result-type 
result-params) (org-babel-python-evaluate-external-process body result-type 
result-params preamble))
  org-babel-python-evaluate(#<buffer *Python*> "print(foo(100)) \nprint \"bye\"" output 
("output" "replace") nil)
(let* ((session (org-babel-python-initiate-session (cdr (assoc :session params)))) (result-params (cdr (assoc :result-params params))) (result-type (cdr (assoc :result-type params))) (return-val (when (and (eq result-type (quote value)) (not session)) (cdr (assoc :return params)))) (preamble (cdr (assoc :preamble params))) (full-body (org-babel-expand-body:generic (concat body (if return-val (format "\nreturn %s" return-val) "")) params (org-babel-variable-assignments:python params))) (result (org-babel-python-evaluate session full-body result-type result-params preamble))) (org-babel-reassemble-table result (org-babel-pick-name (cdr (assoc :colname-names params)) (cdr (assoc :colnames params))) (org-babel-pick-name (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params))))) org-babel-execute:python("print(foo(100)) \nprint \"bye\"" ((:comments . #1="") (:shebang . #1#) (:cache . "no") (:padline . #1#) (:noweb . "no") (:tangle . "no") (:exports . "results") (:results . "replace output") (:hlines . "no") (:padnewline . "yes") (:session) (:result-type . output) (:result-params "output" "replace") (:rowname-names) (:colname-names))) org-babel-execute-src-block(nil ("python" "print(foo(100)) \nprint \"bye\"" ((:comments . #1="") (:shebang . #1#) (:cache . "no") (:padline . #1#) (:noweb . "no") (:tangle . "no") (:exports . "results") (:results . "replace output") (:hlines . "no") (:padnewline . "yes") (:session) (:result-type . output) (:result-params "output" "replace") (:rowname-names) (:colname-names)) "" nil 0))
  org-babel-execute-src-block-maybe()
  org-babel-execute-maybe()
  org-babel-execute-safely-maybe()
  run-hook-with-args-until-success(org-babel-execute-safely-maybe)
  org-ctrl-c-ctrl-c(nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)


Reply via email to