[luatex] io.lines() and TeXLive 2017

Brian Dunn bd at bdtechconcepts.com
Sat Jun 10 02:31:11 CEST 2017


I haven't see this reported yet:

With TeXLive 2016, executing the following program test.lua prints the
contents of the file test.txt using each of two methods.

With TeXLive 2017, the second method fails.


File test.lua:
---
#!/usr/bin/env texlua

print ("First Method")
local sfile = io.open("test.txt")
for line in sfile:lines() do
	print (line)
end

io.close(sfile)

print ("Second Method")
io.input("test.txt")
for line in io.lines() do
	print (line)
end
---


File test.txt:
---
This is a test.
Another line.
---


Brian

-- 
Brian Dunn
BD Tech Concepts LLC
http://www.BDTechConcepts.com
bd at BDTechConcepts.com

http://www.linkedin.com/in/bdtechconcepts/


More information about the luatex mailing list