From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Meehan 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 20:39:01 -0600 Message-ID: References: <20210115091620.GA9842@tuxteam.de> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26384"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user To: tomas@tuxteam.de Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Jan 16 03:39:18 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 1l0bUj-0006ln-0F for guile-user@m.gmane-mx.org; Sat, 16 Jan 2021 03:39:17 +0100 Original-Received: from localhost ([::1]:46694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0bUh-0003dA-UJ for guile-user@m.gmane-mx.org; Fri, 15 Jan 2021 21:39:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0bUX-0003cz-G1 for guile-user@gnu.org; Fri, 15 Jan 2021 21:39:05 -0500 Original-Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:35119) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0bUV-0005bk-PA for guile-user@gnu.org; Fri, 15 Jan 2021 21:39:05 -0500 Original-Received: by mail-qk1-x72e.google.com with SMTP id n142so13757145qkn.2 for ; Fri, 15 Jan 2021 18:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=YWR7/fZIUHOsDC8uAptdP9ozzesq26VJbGIHAT727ME=; b=J8jsKdddcYzeF3P09Qc/HcapakQKnzWmAhOwb4bn+a/jLi1xMJRkEvQt/j8TtjIk/+ yS/hZJwyBs4Pq0QdAYhxvIgkDK9/yQQnmBuJ/TPqj0+FmbltvTZTvv11eoxbSTmk4daY TaZlJmpXN4yPWJw2xrmP4pk0cGPcIF3vkcAHkK6PvWq3anuxkssjqMm9K5oE/UH0b0XJ 6iYukw+eF0znciCMas6MEgFPqsBSAGbkh11p7Ls7oIoElHR6KSabmEQHHToZTR27Xefm kw7DcQ8bCF+XMS+tjs412X/DBoOME7KvfIkvdT0gHHs8Wf0oDDEcLIh2EOctuLoTxC9p KqBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=YWR7/fZIUHOsDC8uAptdP9ozzesq26VJbGIHAT727ME=; b=mkfKKmmVSvoG8F5MmdnPbaCOA8GNLEbZa78veu9+hMdVqSrB8bHXkAa4gExThPyKQY DlDR5q8G3iBo69Kg2H3Fq9Let/5a43Fnpx7NT5R4RGWdoZDhCDyxD/aKKMD2zDdhRDqZ QHVHLER8RxiRDRdMjB+Pkd0QciFwBKBHHdbUK+eAbQDvLcH3G+mlUzRQGS6R3/bhAF7U SQc2vGQDCJXsmjUuoPZUJBwQCumR6amOjWbTa5smP8S50+bzc2o1ys5Q4x8KIisgnzdo iEsWg+upFzao0LH8llLf9rzW9+tOjV0c0RieDOXsBEgkbv8RAMj6uS7yPY6qkfJs+bGL 2S3Q== X-Gm-Message-State: AOAM532SWMnKAKP3nDIz8yHXG8KRRKp0mvqyFDQQd47eNeyd1JcCKqMa PHTndby8YotJqtTChlVTb7bdrdVbgHA= X-Google-Smtp-Source: ABdhPJzuy9jh+ZAJX8k/6hjTrCAJCbIOvTjvNl+1/QZ8SkVNZeqcYiC4AaHcwDDg6NSA2QrAoyYPrQ== X-Received: by 2002:a37:b442:: with SMTP id d63mr15868977qkf.430.1610764742614; Fri, 15 Jan 2021 18:39:02 -0800 (PST) Original-Received: from [10.0.1.12] ([24.96.23.175]) by smtp.gmail.com with ESMTPSA id s30sm6058424qte.44.2021.01.15.18.39.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jan 2021 18:39:02 -0800 (PST) In-Reply-To: <20210115091620.GA9842@tuxteam.de> X-Mailer: iPhone Mail (18B92) Received-SPF: pass client-ip=2607:f8b0:4864:20::72e; envelope-from=btmeehan@gmail.com; helo=mail-qk1-x72e.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:17180 Archived-At: I tried the force output right there. It still doesn=E2=80=99t pop up the wi= ndow until you type =E2=80=9Cquit,=E2=80=9D it then shows the window for a w= hile (because of the Python pause calls). Thanks for looking at it > On Jan 15, 2021, at 03:16, tomas@tuxteam.de wrote: >=20 > =EF=BB=BFOn 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 [...] >=20 > Warning: untested. But perhaps you need to put a `force-output'... >=20 > [...] >> (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") >=20 > ... around here? >=20 >> (loop (readline prompt)))) >>=20 >> (close-pipe stuff) >=20 > (I'm still surprised that setting the buffer to 'none didn't help). >=20 > Cheers > - t