unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Tim Meehan <btmeehan@gmail.com>
To: tomas@tuxteam.de
Cc: guile-user <guile-user@gnu.org>
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	[thread overview]
Message-ID: <B8535E24-F482-4C68-B47F-23C1BCC4824A@gmail.com> (raw)
In-Reply-To: <20210115091620.GA9842@tuxteam.de>

I tried the force output right there. It still doesn’t pop up the window until you type “quit,” it then shows the window for a while (because of the Python pause calls).

Thanks for looking at it

> On Jan 15, 2021, at 03:16, tomas@tuxteam.de wrote:
> 
> 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.
>> 
>> 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)
>> 
>> (let loop ([command (readline prompt)])
>>    (unless (string-prefix? "quit" command)
>>        (display "updating\n")
>>        (put-string stuff "update_data()\n")
> 
> ... around here?
> 
>>        (loop (readline prompt))))
>> 
>> (close-pipe stuff)
> 
> (I'm still surprised that setting the buffer to 'none didn't help).
> 
> Cheers
> - t



      reply	other threads:[~2021-01-16  2:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15  4:56 open-pipe* seems to buffer all of my writes when I don't want it Tim Meehan
2021-01-15  9:16 ` tomas
2021-01-16  2:39   ` Tim Meehan [this message]

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=B8535E24-F482-4C68-B47F-23C1BCC4824A@gmail.com \
    --to=btmeehan@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=tomas@tuxteam.de \
    /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).