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

MathGroup Archive 2008

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

Search the Archive

Re: mx files

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87813] Re: mx files
  • From: Hannes Kessler <HannesKessler at hushmail.com>
  • Date: Thu, 17 Apr 2008 07:00:12 -0400 (EDT)
  • References: <ftvd65$d9v$1@smc.vnet.net> <fu218h$r5m$1@smc.vnet.net>

Hello,

this means, the utilities for dealing with contexts and packages which
work automatically for .m files (BeginPackage[.., {..}], Needs after
Begin["`Private`"] etc.) have to be modified for .mx files  .. ?!

I have a large number of packages in my Applications directory. Many
of them depend on each other. If I follow your advice, there will be a
lot of redundancy: For the example below, the definitions of
OtherPackage will be stored in OtherPackage.mx (for users calling
Needs["OtherPackage`"] but also in SomePackage.mx (for users calling
Needs["SomePackage`"]. It seems, for creating SomePackage.mx I have to
include also all packages which appear in $Packages after starting the
kernel and executing SomePackage.nb.

Is that the correct approach?

Best regards,
Hannes Kessler

On 16 Apr., 13:20, Jens-Peer Kuska <ku... at informatik.uni-leipzig.de>
wrote:
> Hi,
>
> DumpSave[ "SomePackage.mx", {"SomePackage`","OtherPackage`"}]
>
> ??
>
> Regards
>    Jens
>
> Hannes Kessler wrote:
> > What about the following example?
>
> > BeginPackage["SomePackage`", {"OtherPackage`"}]
> > ...
> > EndPackage[]
> > DumpSave[ "SomePackage.mx", "SomePackage`"]
>
> > Quit[]
> > Needs["SomePackage`"]
>
> > The context "OtherPackage`" is not in $ContextPath as it should be.
>
> > Regards,
> > Hannes Kessler
>
> > On 15 Apr., 12:49, Jens-Peer Kuska <ku... at informatik.uni-leipzig.de>
> > wrote:
> >> Hi,
>
> >> DumpSave[] will do it.
>
> >> Regards
> >>    Jens
>
> >> Hannes Kessler wrote:
> >>> Hello,
> >>> what is the preferred method to create packages in .mx files analogous
> >>> to the initialization cell method in notebooks to maintain packages in
> >>> the .m format?
> >>> Best regards,
> >>> Hannes Kessler



  • Prev by Date: Re: Re: Package to 'graft' Lists onto Matrices
  • Next by Date: Fwd: Help with minimization of Eigenvalues
  • Previous by thread: Re: mx files
  • Next by thread: Re: Labelling contours on contour plots