Re: Package Help in Mathematica 6
- To: mathgroup at smc.vnet.net
- Subject: [mg75997] Re: Package Help in Mathematica 6
- From: Mark Fisher <mark at markfisher.net>
- Date: Mon, 14 May 2007 03:54:40 -0400 (EDT)
- References: <f26npd$4bd$1@smc.vnet.net>
Bill Rowe wrote: > On 5/12/07 at 3:02 AM, raulm231 at comcast.net (Raul Martinez) wrote: > >> I ran into a similar problem. I wanted to know all the standard >> packages included with Math 6. After a bit of help from WRI tech >> support and some digging in the Document Center I compiled a list of >> all the Math 6 standard packages. Here they are: > > <list of 20 packages snipped> > > That wasn't a complete list. For example, it did not include the > ANOVA package or the BlackBodyRadiation package. > > The following will generate a complete list of the packages > installed with version 6. > > Last[StringSplit[#, "/"]] & /@ > FileNames["*", > ToFileName[{$InstallationDirectory, "AddOns", > "Packages"}]] // TableForm > > > Note, I am using version 6 on Mac OS X. For other operating > systems you likely will need to change the second argument to StringSplit. > > In addition, there are the legacy packages installed which can > be listed using: > > Last[StringSplit[#, "/"]] & /@ > FileNames["*.m", > ToFileName[{$InstallationDirectory, "AddOns", "LegacyPackages"}], > 2] // TableForm > -- > To reply via email subtract one hundred and four > Nice. How about $StandardPackages := # <> "`" & /@ StringSplit[ FileNames["*", ToFileName[{$InstallationDirectory, "AddOns", "Packages"}]], $PathnameSeparator][[All, -1]] $LegacyPackages := (#1 <> "`" <> #2 <> "`") & @@@ StringSplit[ FileNames["*.m", ToFileName[{$InstallationDirectory, "AddOns", "LegacyPackages"}], 2], {$PathnameSeparator, "."}][[All, {-3, -2}]] That should work for all operating systems ($PathnameSeparator) and produce a list of contexts that can be called with Get. --Mark