lua-users home
lua-l archive

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




On Fri, Jan 14, 2011 at 2:28 PM, steve donovan <steve.j.donovan@gmail.com> wrote:
On Fri, Jan 14, 2011 at 8:26 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> The lfs module from LuaFileSystem is the best known method:

Nah, scratch that - sorry I have not had my tea.

You can look at arg[0] for the script name, and work from there.

Or get the debug information:

function script_path()
   -- remember to strip off the starting @
   return debug.getinfo(2, "S").source:sub(2)
end

print(script_path())

The debug library seems works on that. Thank you. I find it.
 
steve d.