log files on PowerMac (Q:)
- To: mathgroup at smc.vnet.net
- Subject: [mg8217] log files on PowerMac (Q:)
- From: "m. r. schaferkotter" <schaferk at communique.net>
- Date: Tue, 19 Aug 1997 21:11:56 -0400
- Organization: NOne
- Sender: owner-wri-mathgroup at wolfram.com
greetings: i have a rather complex program that runs and fills up the notebook with output. i will like to have all the output directed to a text file for later viewing. i have been able to run the program in "batch" from the Kernel with output directed to a file. however there is a problem with turning the output back "on" in the Kernel. any comments on the solution are welcomed... If[MemberQ[FileNames[],"out.log"] == True,DeleteFile["out.log"]]; Print[$Output]; outstream = $Output[[1]]; AppendTo[$Output,OpenWrite["out.log"]]; (* this stops the Print in the Kernel terminal window *) $Output = Complement[$Output,{outstream}]; (* execute the program *) <<someprog; AppendTo[$Output,outstream]; thanx m. r.