lua-users home
lua-l archive

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


On Fri, May 04, 2012 at 12:20:56PM +0100, Emeka wrote:
> There is this popular language which allows one to easily  list out all the
> functions in a library.
> Say I have this:
> import os
> dir(os) Will list the functions and others.
> How can I do the same with Lua?

lua -e'table.foreach(require "os", print)'

Not as pretty, but it'll work.

D.

-- 
Daniel Silverstone                         http://www.digital-scurf.org/
PGP mail accepted and encouraged.            Key Id: 3CCE BABE 206C 3B69