emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Michael Steeves <steeves@raingods.net>
Cc: Orgmode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: Suppressing interpeter output in code blocks
Date: Thu, 06 Jun 2013 10:04:33 -0600	[thread overview]
Message-ID: <87a9n36x9q.fsf@gmail.com> (raw)
In-Reply-To: <51AF9934.6000009@raingods.net> (Michael Steeves's message of "Wed, 05 Jun 2013 16:01:56 -0400")

Michael Steeves <steeves@raingods.net> writes:

> Apologies if this is documented somehere, but I haven't been having much
> luck in trying to find the answer to this.
>
> If I have an org doc with some python code in it
>
> #+begin_src python :session testing :results output
> a = 1
> b = 2
> c = a + b
> print "Hello, world."
> #+end_src
>
> when I evaluate the block, the output is
>
> #+RESULTS:
> : Python 2.7.5 (default, May 19 2013, 13:26:46)
> : [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))]
> on darwin
> : Type "help", "copyright", "credits" or "license" for more information.
> : >>> >>> Hello, world.
>
> Is there any way to suppress all the extra text, and just get the
> "Hello, world." string as my output?
>

#+begin_src python :session testing
a = 1
b = 2
c = a + b
"Hello, world."
#+end_src

#+RESULTS:
: Hello, world.

Best,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

  reply	other threads:[~2013-06-06 16:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 20:01 Suppressing interpeter output in code blocks Michael Steeves
2013-06-06 16:04 ` Eric Schulte [this message]
2013-06-06 18:08   ` Michael Steeves
2013-06-06 18:28     ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a9n36x9q.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=steeves@raingods.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).