[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: use a string as stdin?
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 23 Mar 2010 09:52:28 +0200
On Tue, Mar 23, 2010 at 9:44 AM, Valerio Schiavoni
> 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.