This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Add-ons & Links / Standard Packages / Utilities /


The FindPackages function.

The functions in this package are for searching and maintaining Mathematica packages. FindPackages will give a list of the packages available, in their context form (e.g., "Utilities`Package`") or in a full path name form (e.g., "/usr/local/Wolfram/Mathematica/AddOns/StandardPackages/Utilities/Package.m".) You can specify a list of directories to search. You can also specify a string pattern, or a list of patterns, to be matched. Note that a pattern should not try to match the ".m"; the function handles this.

This loads the package.

In[1]:= <<Utilities`Package`

This gives all packages whose names end in "ca" for each directory in $Path. Directories containing no packages fitting the pattern give empty lists.

In[2]:= FindPackages[$Path, "*ca"]

Out[2]= {{}, {}, {}, {DiscreteMath`Combinatorica`}, {}}

Option for FindPackages.

Here the same search is performed, but full path names are returned.

In[3]:= FindPackages[$Path, "*ca",
FullPath -> True]

Out[3]= {{}, {}, {},

The Annotation function.

Mathematica packages contain various annotative comments tagged with keywords. The Annotation function allows you to discover what keywords are present in a package (or list of packages), then retrieve the actual annotation comments containing the keywords. This function recognizes a package name in either context form or as an explicit file name.

This finds the annotative keywords in the Statistics`NonlinearFit` package.

In[4]:= Annotation["Statistics`NonlinearFit`"]


The string "Mathematica Version" is a useful keyword; it generally indicates the minimum release of Mathematica required for a particular package.

In[5]:= Annotation["Statistics`NonlinearFit`",
"Mathematica Version"]