 |
|
List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Can cmaple run in a server mode?
| [MUG] Can cmaple run in a server mode? |
|
Author: Carl Eberhart
Posted: 10/11/2000 15:21:35 GMT
|
>> From: "Carl Eberhart"
Hello,
Is there a version of command line maple which runs in a
server mode? That is, it can be started up and accept input
from and return output to other applications, such as a Perl
script? None of the command line options to cmaple (in Maple 6)
suggest that this is the case, but perhaps not all options are listed.
Thanks in advance.
Carl Eberhart
|
| [MUG] Re: Can cmaple run in a server mode? |
|
Author: Maple Group
Posted: 15/11/2000 20:58:58 GMT
|
>> From: Maple Group
| >> From: "Carl Eberhart"
|
| Hello,
| Is there a version of command line maple which runs in a
| server mode? That is, it can be started up and accept input
| from and return output to other applications, such as a Perl
| script?
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 14 Nov 2000 13:22:06 +0100
From: Theodore Kolokolnikov
To:
Subject: Can cmaple run in a server mode?
Yes. By default cmaple reads from standard input and writes to standard
output.
Use also -q option. We have successfully used cmaple as an engine
for over-the-web evaluation of math tests.
See also my answer on
http://www-math.math.rwth-aachen.de/MapleAnswers/735.html
which also contains a Java class to interact with Maple.
Regards,
theodore.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
To:
From: "Nikolay Semchenok"
Date: Tue, 14 Nov 2000 18:30:41 +0300 (MSK)
Subject: Can cmaple run in a server mode?
Hello,
Try the following example. It illustrates how to send commands from Maple to
Perl, and retrieve calculations and graphics.
#!/usr/local/bin/perl
#get the current process number
$pid = $$;
#open a connection to Maple
$maple = "| cmaple -q > maple.$pid";
$maplegif = "maplegif.$pid";
open(MAPLE, $maple) || print STDERR "Maple can't be opened!\n";
#Send commands via print
print MAPLE "evalf(Pi); \n";
print MAPLE
"interface(plotdevice=gif,plotoutput=`$maplegif`,plotoptions=`width=500,height=3
00`);\n";
print MAPLE "plot(x^2, x=-2..2);";
print MAPLE "quit;\n";
close(MAPLE);
Regards,
Nikolay Semchenok
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 14 Nov 2000 12:55:53 -0800
From: "Joe Riel (home)"
To:
Subject: Can cmaple run in a server mode?
The standard cmaple process will do this. I use one with emacs to
display help pages and execute code. You probably want to call it with
the -q option to suppress the startup messages. You also might have to
play with the interface settings to suppress prompts [I'm a little hazy
here, it's been awhile since I wrote the code].
Joe Riel
|
| [MUG] Re: Can cmaple run in a server mode? |
|
Author: Greg Nash
Posted: 17/11/2000 22:18:01 GMT
|
>> From: Greg Nash
I'm not quite sure I understand your question, but I have run cmaple in
a cgi directory from a perl script on a remote server. From my web
browser, using forms to enter data/procedures, I ran cmaple on the
server using this input and returned results that got displayed in my
browser. I set up the script to allow me to download output files as
well by clicking on a button.
If you want any more details let me know, but it was very
straightforward.
Greg Nash
Centar
Carl Eberhart wrote:
>
> >> From: "Carl Eberhart"
>
> Hello,
> Is there a version of command line maple which runs in a
> server mode? That is, it can be started up and accept input
> from and return output to other applications, such as a Perl
> script? None of the command line options to cmaple (in Maple 6)
> suggest that this is the case, but perhaps not all options are listed.
> Thanks in advance.
> Carl Eberhart
|
| [MUG] Re: Can cmaple run in a server mode? |
|
Author: Andre Poenitz
Posted: 27/11/2000 08:29:01 GMT
|
>> From: Andre Poenitz
> Carl Eberhart wrote:
> >
> > >> From: "Carl Eberhart"
> >
> > Hello,
> > Is there a version of command line maple which runs in a
> > server mode? That is, it can be started up and accept input
> > from and return output to other applications, such as a Perl
> > script? None of the command line options to cmaple (in Maple 6)
> > suggest that this is the case, but perhaps not all options are listed.
> > Thanks in advance.
> > Carl Eberhart
You can pipe a command into maple as grab the output as you would do with
every other command:
~ > echo -e "result:\n `echo 'int(x,x);' | maple -q`"
result:
2
1/2 x
The -q supresses the "banner" at startup.
Andre'
--
Andre Poenitz ........................................
|
Previous by date: [MUG] Question on implicitplot colors, Sol X Rochman
Next by date: [MUG] Re: printing plots with G-4, Mike Schmiderer
Previous thread: [MUG] Kronecker delta, Willard, Daniel Dr DUSA-OR
Next thread: [MUG] printing plots with G-4, Edwin Clark
|
|
|