lua-users home
lua-l archive

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


On Thu, Aug 15, 2013 at 9:15 AM, Jakub Piotr Cłapa <jpc-ml@zenburn.net> wrote:
What would be really nice is a wrapper around luaposix and lua-winapi modules which would work like the subprocess module in Python.

Nice and very doable, I've been thinking about this. Generally people pick a platform and use the appropriate native API, but it _is_ useful to have cross-platform scripting that hides some implementation details.

As for Lorenzo's desire to do it in pure Lua, there's nothing wrong with using temporary files, since there are standard places that are always available for this.  A gotcha on Windows is that os.tmpname() returns a file without the necessary path, so use os.getenv('TMP")..'\\'..os.tmpname().  (Blame this weirdness on MS)