lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Mar 23, 2010 at 9:44 AM, Valerio Schiavoni
<valerio.schiavoni@gmail.com> wrote:
> Do you know if it's possible to play with stdin so that the string is
> set as the current stdin, so that I avoid to write on disk ?

Unfortunately, we do not have popen2, where you can write to the
process input and then read the process output.  (I believe luaex has
such a function)

Using a temp file isn't so bad, but make sure it's writeable for
everyone. E.g. os.tmpname on Windows gives you a temp file with a root
path (\name), and Vista will bitch for a good reason. os.getenv 'TMP'
will get you a suitable path.

steve d.