From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Neil Jerram" Newsgroups: gmane.lisp.guile.user Subject: Re: X11 bindings and shell bindings Date: Thu, 18 Sep 2008 17:58:25 +0100 Message-ID: <49dd78620809180958t38d8f1cfje56aeeb8d9de8c97@mail.gmail.com> References: <17616791.2846141221754081968.JavaMail.root@cdptpa-web08-z02> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1221757139 30618 80.91.229.12 (18 Sep 2008 16:58:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Sep 2008 16:58:59 +0000 (UTC) Cc: Guile User Mailing List To: dsmich@roadrunner.com Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Sep 18 18:59:56 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KgMrC-0003NG-Fi for guile-user@m.gmane.org; Thu, 18 Sep 2008 18:59:54 +0200 Original-Received: from localhost ([127.0.0.1]:33955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgMqB-0002VJ-EO for guile-user@m.gmane.org; Thu, 18 Sep 2008 12:58:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgMpo-0002Qq-R6 for guile-user@gnu.org; Thu, 18 Sep 2008 12:58:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgMpn-0002NO-1W for guile-user@gnu.org; Thu, 18 Sep 2008 12:58:28 -0400 Original-Received: from [199.232.76.173] (port=51438 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgMpm-0002Mx-RP for guile-user@gnu.org; Thu, 18 Sep 2008 12:58:26 -0400 Original-Received: from wf-out-1314.google.com ([209.85.200.168]:42130) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KgMpm-0005Qk-Ad for guile-user@gnu.org; Thu, 18 Sep 2008 12:58:26 -0400 Original-Received: by wf-out-1314.google.com with SMTP id 28so3861185wfc.24 for ; Thu, 18 Sep 2008 09:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Uh6h+nYI6P5CxsFld6U+iVM2yPy7N0DXmibdHNFmkOo=; b=ZS6JlADIgYT+n4qieX9vA5yZu2+8oPotMBPVzPjPwJ+eNL2gHBY1DHu339rM3U6/Su rS562WLzg0a89dvvqWIRA2xh8yw+R5cK2cA+8uUPdzjQWgpz72MqtkmH6IjaILdQYvGv TJtkuBZU9cEGbk5LxNUIPo+tQQc5JCMbPYYio= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=SjxDcozMscoSwE+fNHya1T32iKoikOjUD81UW+BpUD9AvatxSZZ3Sg/TU87zL2+vSJ QxFZ1182p/mjCuFWShprZu0/UAkf3d3JtWd3NVzl6BOVyLBDcOWSVJCwkR2MmHYdS8RU HN0ePVHwztC5M6tkSjBq4tQWttON/kkgvQDVM= Original-Received: by 10.141.27.16 with SMTP id e16mr7698257rvj.136.1221757105392; Thu, 18 Sep 2008 09:58:25 -0700 (PDT) Original-Received: by 10.140.142.15 with HTTP; Thu, 18 Sep 2008 09:58:25 -0700 (PDT) In-Reply-To: <17616791.2846141221754081968.JavaMail.root@cdptpa-web08-z02> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6777 Archived-At: 2008/9/18 : > ---- Ishan Arora 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