guile-user
[Top][All Lists]
Advanced

[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: Tim Meehan
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

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 via email to

[Prev in Thread] Current Thread [Next in Thread]