Question: How to programmatically obtain list of all build-in packages and functions/symbols in them?

Update:

thanks for the answers below, I can now get listing of content of an .mla like this:

restart;
with(LibraryTools):
LibLocation:=cat(kernelopts(mapledir),"/lib/maple.mla");
ShowContents(LibLocation);

But could not yet find a command that actually lists the standard *.mla libraries that come with Maple. I have to go to C:\Program Files\Maple 18\lib and copy the name of each file with .mla extention in there to get its content. Is there a way to obtain a list of all the .mla files or the standard libraries so that to automate all of this? Otherwise, I'll just copy the names of all the mla files in the above folder and make a list of them manually.

original question:

in Maple, I can do ?packages to get a help page showing list of packages available. But I need a way to do this in code, and obtain result as list or set. Next I'd like to go over each package and also obtain list of all symbols and functions/proc in this package.

For example, once I get list of packages, I'd like to get list of functions in say algcurves package, so I should get ["AbelMap", "algfun_series_sol",.....].  The list can be just strings. That is ok, I am just trying to enumerate all packages and build-in commands and symbols in Maple. May be make a small report of it for documentation purposes and to get better idea what is in Maple.

What are the commands I need to get such lists?

I am using Maple 18.02 on windows.

 

Please Wait...