Re: Mathematica from Perl
- To: mathgroup at smc.vnet.net
- Subject: [mg29274] Re: [mg29242] Mathematica from Perl
- From: Omega Consulting <pptssman at yahoo.com>
- Date: Sat, 9 Jun 2001 03:09:02 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Mathematica notebooks are primarily for use with the front end. You would be much better off trying to interface with the kernel. The best way to do this is to convert your notebook into a package (File>Save As Special>Package Format). Once you do this, you can communicate with the kernel in several ways. You can use perl commands to execute the kernel just like you would from the command line. Such as exec("math << mypackage.m >> myresults.txt") This executes the kernel with input coming from your package and output going to a text file (assuming that you or the perl script needs to look at the output). You can also have the package write output to a file with kernel commands. This gives you more control over the output. An alternative is to use MathLink to communicate between perl and Mathematica. See http://www.mathsource.com/Content/Enhancements/MathLink/0209-393 At 12:14 AM 6/7/2001, Zoltan Garamvolgyi wrote: >Hello Everybody, > >How can I run a Mathematica notebook form perl script? >How can I read the commandline's argument in mathematica? > >Thank you for your help, > >Zoltan Garamvolgyi >Hungary > >_________________________________________________________________________ >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.