Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2721

Re: External software

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!news.osn.de!diablo2.news.osn.de!ecngs!feeder.ecngs.de!feeder.news-service.com!newspump.sol.net!posts.news.twtelecom.net!nnrp2.twtelecom.net!not-for-mail
From Patrick Scheibe <pscheibe@trm.uni-leipzig.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: External software
Date Wed, 25 May 2011 23:34:44 +0000 (UTC)
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <irk3mk$7ca$1@smc.vnet.net> (permalink)
Lines 43
NNTP-Posting-Date 25 May 2011 22:35:49 GMT
NNTP-Posting-Host cc74e6fe.news.twtelecom.net
X-Trace DXC=0aSL=0c0UgD4bRofF\;X]@C_A=>8kQj6M9BHNOcEA\@I;G`^VMg0A7LEFiONJ7[GoFO8VGL0ioQjA
X-Complaints-To abuse@twtelecom.net
Xref x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:2721

Show key headers only | View raw


Hi,

Run[..] is the right command and somthing similar works perfectly fine
on my Linux machine. Have you tried to give your command as

Run["program.exe", "-i oldfile.dat", "-o newfile.dat"]

Are you sure that your program.exe is found? Remember that when using
the commandline from within Mathematica your Paths and Environment
Variables may be different.

Have you checked your return code from Run? Try something simple like

Run["dir"]

and you should get 0 as return value (if this is on Windows the same
return code). When you run a command which does not exist, you should
get a different return code:

In[3]:= Run["forbar"]

Out[3]= 32512

Hope this helps a bit.

Cheers
Patrick

On Wed, 2011-05-25 at 05:54 -0400, ZnFinger wrote:
> Suppose I had an external program that took a file in and modified it,
> saving the modified version as a new file in this format
> 
> program.exe -i oldfile.dat -o newfile.dat
> 
> Is there any way to send this little command to the system command
> prompt? There is no need for information sharing between this program
> and mathematica, so it seems unnecessary to use Run, RunThrough or
> writing a MathLink. Using Run I can provoke a command prompt to pop up
> but the program is never run. Any suggestions?
> 


Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: External software Patrick Scheibe <pscheibe@trm.uni-leipzig.de> - 2011-05-25 23:34 +0000

csiph-web