Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4748 > unrolled thread

Print bug with -script? (quotes display)

Started byAlan <alan.isaac@gmail.com>
First post2011-09-04 22:09 +0000
Last post2011-11-02 11:21 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Print bug with -script? (quotes display) Alan <alan.isaac@gmail.com> - 2011-09-04 22:09 +0000
    Re: Print bug with -script? (quotes display) "Rolf.Mertig@gmail.com" <rolf.mertig@gmail.com> - 2011-09-06 07:57 +0000
      Re: Print bug with -script? (quotes display) MC Andre <andrew.pennebaker@gmail.com> - 2011-11-02 11:21 +0000

#4748 — Print bug with -script? (quotes display)

FromAlan <alan.isaac@gmail.com>
Date2011-09-04 22:09 +0000
SubjectPrint bug with -script? (quotes display)
Message-ID<j40sub$l1t$1@smc.vnet.net>
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.html 

Is it a bug?

Thanks,
Alan Isaac

[toc] | [next] | [standalone]


#4770

From"Rolf.Mertig@gmail.com" <rolf.mertig@gmail.com>
Date2011-09-06 07:57 +0000
Message-ID<j44jok$8uj$1@smc.vnet.net>
In reply to#4748
On Sep 5, 12:09 am, Alan <alan.is...@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

[toc] | [prev] | [next] | [standalone]


#6107

FromMC Andre <andrew.pennebaker@gmail.com>
Date2011-11-02 11:21 +0000
Message-ID<j8r94i$3en$1@smc.vnet.net>
In reply to#4770
On Sep 6, 3:57 am, "Rolf.Mer...@gmail.com" <rolf.mer...@gmail.com>
wrote:
> On Sep 5, 12:09 am, Alan <alan.is...@gmail.com> wrote:
>
> > I am using Mathematica under Windows Vista.  To run Mathematica comma=
nds 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://ref=
erence.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

Confirmed, the bug is present in Windows and Mac OS X. Do the
developers run their code even once?

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web