[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: open-pipe* seems to buffer all of my writes when I don't want it.
From: |
tomas |
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 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
signature.asc
Description: Digital signature