Hi Herb, The following org-mode file and minimal elisp file can be used to print the results of evaluating a code block from a batch Emacs session (note this is using Emacs24, so Org-mode/Babel do not need to be explicitly loaded).
I used the following command line : emacs --batch -l run-code.el 2> /dev/null And the following two files.
run-code.el
Description: application/emacs-lisp
#+Title: short code buffer #+begin_src python :results output print "hello" 2 print "bye" #+end_src #+results: : hello : bye
Cheers -- Eric Herbert Sitz <hs...@nwlink.com> writes: > The Org manual gives an example of a batch mode --eval that runs code to > tangle > code from Org files. I assume there's also a way to simply run a source code > block and get its output in the terminal but I can't see how to do it. > > To give a concrete example, the Org manual uses this Python source block as > example illustrating the difference between :session and non-session results > output. How would I evaluate it from the command line and get the results > output back in the terminal?: > > ------------------------- > #+begin_src python :results output > print "hello" > 2 > print "bye" > #+end_src > ------------------------ > > -- Herb > > > -- Eric Schulte http://cs.unm.edu/~eschulte/