MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mathematics Packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67100] Re: Mathematics Packages
  • From: Rolf.Mertig at gmail.com
  • Date: Fri, 9 Jun 2006 01:08:37 -0400 (EDT)
  • References: <e665u1$n5h$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,
one possibility to get all standard packages and all symbols defined
is:

packagelist = Flatten[
    (FindList[#1, "BeginPackage[", 1] /.
       s_String :> StringSplit[s, "\""][[2]] & ) /@
     Select[FileNames["*.m", ToFileName[{$TopDirectory,
         "AddOns", "StandardPackages"}], Infinity],
      FindList[#1, "BeginPackage"] =!= {} & ]];
TableForm[packagelist]
AbsoluteTiming[
nb=SetSelectedNotebook@NotebookCreate[];
Do[NotebookWrite[nb,Cell[packagelist[[i]],
      "Section"]]; Needs[packagelist[[i]]];
    symbols[i] = Names[StringJoin[packagelist[[i]],
       "*"]]; Do[NotebookWrite[nb,Cell[
       "? "<>symbols[i][[j]],
        "Input"]],
     {j, Length[symbols[i]]}], {i,Length[packagelist]}]]

Evaluating the generated notebook gives usage messages for all symbols.

With
Select[Split[Array[symbols,Length@packagelist]//Flatten//Sort],Length[#]>1&]
we get the 15 symbols which are defined in more than one package ...

This can be easily adapted to your needs.

Unfortunately a Mathematica package is no expression, if it would be
package handling might be easier.
Of course, truly object oriented languages like Java do have an
advantage
when it comes to software engineering issues ...

Rolf Mertig
GluonVision GmbH
Mathematica training & consulting
Berlin

MR schrieb:
> Hello
>
> Is there a way to get a listing (preferably nicely organized such as in
> a tree format) of all the packages which I can load into the
> system...so, the standards Mathamatica packages plus any extra ones I
> may have?  What about just the standard ones?
>
> (ie, in Java the java website has a lovely reference on line for each
> version with packages, class and finally their methods all organized
> nicely and hierarchically...is such available somewhere for
> mathematica?)
> 
> Thanks
> mr


  • Prev by Date: Re: Using a list as a variable
  • Next by Date: Re: Using a list as a variable
  • Previous by thread: Mathematics Packages
  • Next by thread: Re: <> doesn't work in filename in a batch mode ?