[luatex] writing to log/term

Taco Hoekwater taco at elvenkind.com
Sun Nov 20 10:42:51 CET 2011

On 11/20/2011 08:28 AM, Patrick Gundlach wrote:
> Hi Arno,
> your code is okay (except for the busy waiting :)

Better code:

   delay = 1.0
   texio.write_nl("first comment\n")
   os.sleep (delay)
   texio.write("second comment\n")
   os.sleep (delay)

That avoids the busy sleep, and it may help output responsiveness:
texio.write_nl writes text to a new line, but does not actually append
the next new line, so on a line-buffered output device, you see the
first line only when the second line is being printed. On a block-
buffered device that does not help, but usually terminals are not done
that way.

Best wishes,

More information about the luatex mailing list