Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2011

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

Search the Archive

Re: Print bug with -script? (quotes display)

  • To: mathgroup at
  • Subject: [mg121242] Re: Print bug with -script? (quotes display)
  • From: "Rolf.Mertig at" <rolf.mertig at>
  • Date: Tue, 6 Sep 2011 03:55:23 -0400 (EDT)
  • Delivered-to:
  • References: <j40sub$l1t$>

On Sep 5, 12:09 am, Alan < at> wrote:
> I am using Mathematica under Windows Vista.  To run Mathematica commands as a script, my understanding is that I should invoke
>     math.exe -script <scriptname>
> This is working, but if I print a string
>     Print["Test"]
> it prints surrounded by quotes (as written literally).
> I find this highly undesirable: can the quotes be suppressed?
> Also, this behavior seems to conflict with the documentation:
> Is it a bug?
> Thanks,
> Alan Isaac

One possibility is to define your own Print function:

Or, you could probably even do
Unprotect[Print]; Print[s_String]:=WriteString["stdout",s];

Another possibility would be to switch to Linux, since there this bug
is not present.

Rolf Mertig
GluonVision GmbH

  • Prev by Date: Maximum likelihood estimatior
  • Next by Date: Re: Running notebook from command line
  • Previous by thread: Re: Print bug with -script? (quotes display)
  • Next by thread: Addon packet errors