[luatex] Can't open pipe in .tex doc

Michael Talbot-Wilson mtw at view.net.au
Tue Aug 14 00:09:28 CEST 2012

$ cat textst7.tex && luatex textst7
\directlua {a = io.popen("ls /")
if a == nil then
    print "Woe is me!"
    for c in a:lines(1) do print(c) end
This is LuaTeX, Version beta-0.70.2-2012062812 (TeX Live 2012)
  restricted \write18 enabled.
(./textst7.texWoe is me!
No pages of output.
Transcript written on textst7.log.

Why?  Works as standalone lua.

What I want is for my TeX document to read BLOBs (PDF images) and
other stuff from a PostgreSQL database.  So "ls /" would become a psql
(SQL) command.

More information about the luatex mailing list