Re: waiting command
- To: mathgroup at smc.vnet.net
- Subject: [mg40257] Re: waiting command
- From: atelesforos at hotmail.com (Orestis Vantzos)
- Date: Fri, 28 Mar 2003 04:31:20 -0500 (EST)
- References: <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
Begin by setting the proper directory:
Then evaluate the following:
(* if the file initially does not exist, check whether it exists *)
(* otherwise, check whether the modification date has changed *)
Run["EMFIELD.EXE -p1 -p2"];
(* check every 30 sec whether the file is ready *)
The While loop will exit when the job is done.
Adjust the 30 seconds interval to appropriate value.
Roberto Brambilla <rlbrambilla at cesi.it> wrote in message news:<b5uono$lkb$1 at smc.vnet.net>...
> I'd like to use Mathematica to run an extermal program,
> let me say EMFIELD.EXE with some parameters p1 , p2 :
> Run["EMFIELD.EXE -p1 -p2"]
> The external program put results in the ascii file Results.txt
> (a filename that I can change every time).
> Then I read results from it with
> ReadList["Results.txt", Number,...]
> After an analysis of them inside the same session of Mathematica,
> I modify the parameters p1, p2 and run again the external program.
> And so on for many times until analysis is OK.
> Since EMFIELD may take seconds or hours to generate the results,
> depending on the complexity of the problem and the values of parameters,
> how can I tell Mathematica to wait until the Results.txt file is
> created or updated? Pause[n] would be fine if I knew n, but this is
> not the case and putting a guessed large n is a poor solution
> (offending Mathematica lovers!).
> Many thanks, Roberto
> Roberto Brambilla
> Via Rubattino 54
> 20134 Milano
> tel +39.02.2125.5875
> fax +39.02.2125.5492
> rlbrambilla at cesi.it
Prev by Date:
Re: a little more complex list operation
Next by Date:
Re: Re: Re: DSolve and N do not commute
Previous by thread:
RE: waiting command
Next by thread:
Re: waiting command