On Sat, 11 Jun 2011, Charles Russell wrote:
< Another
< respondent pointed out that the correct command should have been "batch" and
< not "load". "load" evidently expects some other file format, perhaps lisp
< rather than maxima.
Please reply to the Maxima list, not me personally.
Both batch and load should process your Maxima file; load can load both
lisp or maxima code, but it uses the file ending to determine the
language in the file. That is why I asked if
load("test.mac");
works for you.
<
< > Note that if you are trying
< > to change the working directory via system, this will not work: system
< > launches a subshell, executes the system command in that subshell, and
< > returns. It is like typing
< >
< > (cd /tmp; pwd)
< > pwd
< >
< > on the Linux command line.
< >
< > The Maxima command
< >
< > ?xchdir("/tmp")
< >
< > will change the working directory of the Maxima process. That
< > question mark is not a typo. I put the following in my maxima-init.mac
< > file
< >
< > cd(dir) := ?xchdir(dir);
< >
< Thanks. Is "?xchdir" documented anywhere? I can't find it using the maxima
< help system.
<
< This solves my problems as long as I stick to the command-line version of
< maxima. With wxmaxima on Windows 7, though, I get:
<
< system("dir");
< 0
<
< (The maxima prompts are absent because they don't copy from the wxmaxima
< window. I can only mark one line at a time and that without the prompt.) The
< command system("dir") works ok in the command-line version but not in
< wxmaxima.
It's not clear what you are trying to accomplish, but my comment
about system is applicable for windows, also.
Note that ?xchdir changes the working directory of the maxima process;
it does not affect the working directory of any separate process like
a frontend (e.g. xmaxima or wxmaxima).
Leo
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.