MathGroup Archive 2008

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

Search the Archive

Reading a module library from plain text file

  • To: mathgroup at
  • Subject: [mg90056] Reading a module library from plain text file
  • From: carlos at Colorado.EDU
  • Date: Fri, 27 Jun 2008 06:18:44 -0400 (EDT)

Question: is it possible to read a set of modules into a Notebook cell without
using the Package format?

More specifically, I have a set of modules (600 or so, total of about 40000 lines)
 for a particular program to be used for assigned homework this fall.
 To reduce the volume of the distributed notebook I was thinking of
placing the needed
modules into a *plain text*  library file,  say HomeworkModLib.txt,
and read it in the
C++ fashion from an initialization cell of the actual assignment NB:

  <<"HomeworkModLib.txt";    (* Initialization input cell has only
this command *)
  Homework script in another input cell  - prepared by student

If this is possible, here are subquestions:

1.  Must the ModLib file  have a special extension?  my OS is Mac OSX
10.4.11 but
     students could be using Windows, Linux or other Unix flavors
2.  Must the file be in the same directory as the NB for platform
3.  Will execution of the cell initialize the modules and make them
    to the homework script?

Constraints: this must work on versions >=4.1

  • Prev by Date: Re: Bug of Units-package in combination with DynamicModule
  • Next by Date: Re: Export PDF plot or Save Selection As -- big troubles with
  • Previous by thread: Re: help about calling external programs through a Button
  • Next by thread: Re: Reading a module library from plain text file