MathGroup Archive 1999

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

Search the Archive

Re: How to: Read Notebook and auto-evaluate ?

  • To: mathgroup at
  • Subject: [mg21127] Re: How to: Read Notebook and auto-evaluate ?
  • From: "Allan Hayes" <hay at>
  • Date: Fri, 17 Dec 1999 01:21:25 -0500 (EST)
  • References: <831gnl$>
  • Sender: owner-wri-mathgroup at


    NotebookOpen["file path"];

will open your notebook,just like double clicking it (this is still related
to the file and any changes to it that are saved will be reflected in the

    NotebookPut[Get["file path"]];

will open a copy of your notebook (changes to this will not affect the

Get will give the notebooks unformatted notebook expression (this
independent of the file and any changes to it that are saved will not affect
the file)

Allan Hayes
Mathematica Training and Consulting
Leicester UK
hay at
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Lou Pecora" <pecora at> wrote in message
news:831gnl$dak at
> I am unsuccessful in reading in a Notebook and automatically evaluating
> its cells.  The Mathematica book makes it sound simple, but it doesn't
> work.  What am I doing wrong?
> E.g. I have a notebook ("mynbook.nb", say)  with one line:
> xx=2;
> This is a normal cell.  Then when running a session in another notebook I
> use Get to read it in:
> Get["mynbook.nb"]
> This returns lines of text about notebook stuff and shows the assignment
> xx=2 in the midst of all that.  But when I type
> xx  (enter)
> I just get xx back, not 2.  Looks like Mathematica finds the Notebook but
> does not evaluate the cells.  How can I do this?  Thanks for any help.
> Lou Pecora,  email:  pecora at
> Naval Research Laboratory, Washington, D.C. 20375-5000, U.S.A.
>  == My comments are my own and do not reflect the views of the U.S. Navy.
>  == No Spamming or solicitations -- both are illegal at this site ==
> --------------------------------------------------------------------
> Check out our Nonlinear Dynamics Web site:
> --------------------------------------------------------------------
>   * The 5th Experimental Chaos Conference Orlando FL June 1999.
> Check it out at
>   * The 4th Experimental Chaos Conference Sessions & Abstracts Online:, proceedings available.
> --------------------------------------------------------------------

  • Prev by Date: Re: calculus with Grassmann variables
  • Next by Date: Re: help - saving an eps file for latex
  • Previous by thread: Re: How to: Read Notebook and auto-evaluate ?
  • Next by thread: Re: the new @@@ thing, MapApply?