MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

RunThrough[] does not work on Windows (bug)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123793] RunThrough[] does not work on Windows (bug)
  • From: Szabolcs <szhorvat at gmail.com>
  • Date: Mon, 19 Dec 2011 07:20:46 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Reply-to: comp.soft-sys.math.mathematica at googlegroups.com

On Windows, RunThrough[] simply doesn't work.  Try for example installing the cat utility (e.g. from gnuwin32) and running RunThrough["cat", 123].  It will pop up a command window for a split second, but will not return anything.

I looked at the source of RunThrough, and the problem is that it makes two temporary files for input and output, but doesn't quote the file names (which might contain spaces).  The command line that RunThrough assembles and runs on my machine looks like this:

cat < C:\\Documents and Settings\\Administrator\\Local Settings\\Temp\\m-df560c34-9ee2-457e-966e-8d52b32285ac > C:\\Documents and Settings\\Administrator\\Local Settings\\Temp\\m-0aa1555f-e043-47c3-ab67-e8306ca7ac84

This won't work.  It should be the following instead:

cat < "C:\\Documents and Settings\\Administrator\\Local Settings\\Temp\\m-df560c34-9ee2-457e-966e-8d52b32285ac" > "C:\\Documents and Settings\\Administrator\\Local Settings\\Temp\\m-0aa1555f-e043-47c3-ab67-e8306ca7ac84"

Now that I know that RunThrough is implemented in Mathematica, and uses temp files (has no special pipe handling), it's easy to come up with a workaround.



  • Prev by Date: Re: Compile Problem with Nested Sum
  • Next by Date: Re: LogLinearPlot Nintegrate and a strange error message
  • Previous by thread: Is it possible to use a regular expression in the notebook Edit->Find?
  • Next by thread: How to not show the scrollbars when ContentSize does not fit the content in Manipulate?