diff options
author | Marius <mariausol@gmail.com> | 2012-11-26 19:00:25 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-11-26 19:00:25 +0200 |
commit | 48c4609c92a6e0cbbbd8c5e894d2e11b081e032f (patch) | |
tree | 6fd604c2644afd46971a42f42ce3e1a276c19883 /tex/context/base/l-io.lua | |
parent | 7bd57701b696956d241d5f3fec8cc6288082cf5c (diff) | |
download | context-48c4609c92a6e0cbbbd8c5e894d2e11b081e032f.tar.gz |
beta 2012.11.26 13:31
Diffstat (limited to 'tex/context/base/l-io.lua')
-rw-r--r-- | tex/context/base/l-io.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tex/context/base/l-io.lua b/tex/context/base/l-io.lua index 3456001b7..ec628b5e0 100644 --- a/tex/context/base/l-io.lua +++ b/tex/context/base/l-io.lua @@ -336,3 +336,21 @@ end if not io.i_limiter then function io.i_limiter() end end -- dummy so we can test safely if not io.o_limiter then function io.o_limiter() end end -- dummy so we can test safely + +-- This works quite ok: +-- +-- function io.piped(command,writer) +-- local pipe = io.popen(command) +-- -- for line in pipe:lines() do +-- -- print(line) +-- -- end +-- while true do +-- local line = pipe:read(1) +-- if not line then +-- break +-- elseif line ~= "\n" then +-- writer(line) +-- end +-- end +-- return pipe:close() -- ok, status, (error)code +-- end |