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, to...@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