lua-users home
lua-l archive

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


On 7/10/07, steve donovan <steve.j.donovan@gmail.com> wrote:
I'm writing a Lua extension which exports popen (a proper one that
works properly on Windows).

Have you looked at http://lua-users.org/wiki/ExtensionProposal ?  It
provides the functions io.pipe() and os.spawn() which allows one to build
a popen function.  There is an example of popen() given on the page too.

Any extensions out there that create Lua files? I know that liolib
defines a special environment, but that seems basically for private
static variables?

Yes, you can look at the code for ex to see how I accomplished this.
Note the implementation is for Lua 5.1, not Lua 5.0.

    -Mark