From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: open-pipe* seems to buffer all of my writes when I don't want it. Date: Fri, 15 Jan 2021 10:16:20 +0100 Message-ID: <20210115091620.GA9842@tuxteam.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4243"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) Cc: guile-user To: Tim Meehan Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Fri Jan 15 10:17:10 2021 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0LEE-000104-8T for guile-user@m.gmane-mx.org; Fri, 15 Jan 2021 10:17:10 +0100 Original-Received: from localhost ([::1]:58628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0LED-0006Hj-AD for guile-user@m.gmane-mx.org; Fri, 15 Jan 2021 04:17:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0LDb-0005pM-2I for guile-user@gnu.org; Fri, 15 Jan 2021 04:16:31 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:35581) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1l0LDT-0001hN-FT for guile-user@gnu.org; Fri, 15 Jan 2021 04:16:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:Date; bh=bjVabMq6Bq7HXcHS1VTyE3+QX2gLLS9bNrcBXPQAN0U=; b=cHernbn0mK6XzlsxzDrbb9KGak21adRA/sYsx/fOQXrHiPnCwrkRTXRgN5jf8n85o0Ox464PugUKoJGvXbTRhkuxGPanZxhI28asZ+PRgb0xG0HAkHLITZOKyny1ZYsfgR0+n93d3IpDhX4Q8Y1NhSpwOqpNMjCVjmql7uPwWs7CK5JJmp4m+09KfzF5Dd/yJGvevNqQPls5jdwzw4+6XuNQ2qAq1JlIWulj7pQf+ho2z2Y327L07nySfhj8tQPcl/ZY15f9SEb2xk3G988qOiDeVDlnnTrOGNGJ60ptTHbu0yRLmsMt6g3UPsScTVS6lL8HSD9NUydlap5eZeURPg==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1l0LDR-0002st-0R; Fri, 15 Jan 2021 10:16:21 +0100 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17179 Archived-At: --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 14, 2021 at 10:56:42PM -0600, Tim Meehan wrote: > I was trying to use Matplotlib to plot some data, through a call to > "open-pipe*" ... I'm trying to slowly rewrite some of my tools in Scheme. >=20 > When I run the program from the shell with "python -i plotter.py" I can > send it updates ... but when I run it through Guile, it seems to store up > all of my updates [...] Warning: untested. But perhaps you need to put a `force-output'... [...] > (put-string stuff program) > (force-output stuff) >=20 > (let loop ([command (readline prompt)]) > (unless (string-prefix? "quit" command) > (display "updating\n") > (put-string stuff "update_data()\n") =2E.. around here? > (loop (readline prompt)))) >=20 > (close-pipe stuff) (I'm still surprised that setting the buffer to 'none didn't help). Cheers - t --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAmABXWQACgkQBcgs9XrR2kY4vQCeIXtHNgEr/Xgs6G6THu4SIwww da0AnihU7NDOIN9cplNcWv7c6EgN4QL5 =NajB -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--