unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Neil Jerram" <neiljerram@googlemail.com>
To: dsmich@roadrunner.com
Cc: Guile User Mailing List <guile-user@gnu.org>
Subject: Re: X11 bindings and shell bindings
Date: Thu, 18 Sep 2008 17:58:25 +0100	[thread overview]
Message-ID: <49dd78620809180958t38d8f1cfje56aeeb8d9de8c97@mail.gmail.com> (raw)
In-Reply-To: <17616791.2846141221754081968.JavaMail.root@cdptpa-web08-z02>

2008/9/18  <dsmich@roadrunner.com>:
> ---- Ishan Arora <ishanarora@gmail.com> wrote:
>> Hi,
>>
>> Thanks for the reply. I tried system. It calls the code synchronously, and
>> returns a number for success or failure of the command. Is there a way such
>> that the stdout output of the command is returned as a string? Thanks again.
>
> Try open-input-pipe in the (ice-9 popen) module.

That is indeed the best way, with an up to date Guile.  In case you're
stuck with an old one (1.6.x, I think) where open-input-pipe isn't
reliable, you can work around that by doing something like this:

      (system "your-command-here > temp-file.txt")
      (with-input-from-file "temp-file.txt" read-line)

  Neil




  reply	other threads:[~2008-09-18 16:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 16:08 X11 bindings and shell bindings dsmich
2008-09-18 16:58 ` Neil Jerram [this message]
     [not found] <cmu-lmtpd-23352-1221754132-4@mail-imap1.uio.no>
2008-09-18 16:54 ` Kjetil S. Matheussen
  -- strict thread matches above, loose matches on Subject: below --
2008-09-18 12:38 Ishan Arora
2008-09-18 13:52 ` Jon Wilson
2008-09-18 15:10   ` Ishan Arora
2008-09-18 17:01     ` JonWilson
2008-09-18 17:16 ` Paul Emsley
2008-09-18 18:43 ` Andy Wingo
2008-09-18 19:37   ` Linas Vepstas
2008-09-18 21:09     ` Andy Wingo

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.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=49dd78620809180958t38d8f1cfje56aeeb8d9de8c97@mail.gmail.com \
    --to=neiljerram@googlemail.com \
    --cc=dsmich@roadrunner.com \
    --cc=guile-user@gnu.org \
    /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.
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).