MathGroup Archive 2011

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

Search the Archive

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

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

On Sep 5, 12:09 am, Alan <alan.is... at gmail.com> 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:http://reference.wolfram.com/mathematica/tutorial/PropertiesOfStrings...
>
> Is it a bug?
>
> Thanks,
> Alan Isaac

One possibility is to define your own Print function:
myPrint[s_String]:=WriteString["stdout",s];

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
Berlin




  • 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