For the tikzDevice, I want to communicate with a LaTeX process by sending input (generated LaTeX code) to its stdin and parsing output that is written using \immediate\write. In some cases I need also to look at the log file, but I have noticed that it seems to be buffered: When I start pdflatex at the console and type a document, the log file texput.log doesn't seem to be written until I end the document.
Is there a way to flush the buffers for the log file, so that everything accumulated so far is written?
\typeoutto overflow the buffer so that it's emptied eventually, but that's not exactly elegant... – krlmlr Mar 14 '14 at 22:10\iffontchar? – egreg Mar 15 '14 at 10:53|catso that TeX will spawn a new process and every line written to that "file" will be written to the stdin of that process instead (without buffering). Note that the command name must include a period otherwise.texwill be appended. I use this technique for my pythonimmediate package... – user202729 Jan 04 '23 at 14:02