Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Display commands in a package

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88630] Re: [mg88603] Display commands in a package
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sat, 10 May 2008 06:53:24 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200805091116.HAA21523@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

First:  One of the purposes of a package is, in fact, to shield the user 
from seeing the internal definitions of objects in that package 
(especially since the internal definitions might change in subsequent 
versions yet the functionality remain the same, or at least 
backward-compatible).  Typically, a package keeps only a stub for a 
definition within the non-private context of the package.

Second: For some key packages, the code is simply not available in usual 
package format, i.e., in human-readable form.  This is the case, I 
believe, with Graphics`, which does have a very short readable .m file 
you can look at, but essentially nothing of direct interest within it; 
everything seems to be done at a lower level, probably in some compiled 
code.  This may be for reasons of property protection and/or efficiency.

But for a number of other packages, the .m file is right there in the 
Mathematica file tree.  This is the case, for example, with the 
Combinatorica` package.  You can simply open the file and read it -- in 
a text editor if you really wish; by opening it within Mathematica 
itself (File > Open, or just dragging the file to the Mathematica menu 
bar); or in Wolfram Workbench (which I often find provides the most 
attractive and useful way to view a package when you don't have a source 
notebook that created it).


Budaoy wrote:
> In Mathematica, when I load a package, for instance <<Graphics`, in fact the
> system load many commands, but Mathematica doesn't display those commands in
> the package, how can I see them if I do not want to look into package
> document?
> 
> Thanks.
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: EventHandler problem
  • Next by Date: Re: Re: TreePlots and GraphPlots
  • Previous by thread: Re: Display commands in a package
  • Next by thread: Re: Display commands in a package