[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to infer the methods/functions in a library
- From: Michal Kottman <k0mpjut0r@...>
- Date: Fri, 4 May 2012 13:35:56 +0200
On 4 May 2012 13:28, Daniel Silverstone <firstname.lastname@example.org> wrote:
> 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.
If you have Microlight , you can do this:
lua -e 'print(require"ml".tstring(require"os"))'
You can achieve similar results using methods listed in .