[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octsympy question
From: |
Colin Macdonald |
Subject: |
Re: Octsympy question |
Date: |
Tue, 25 Nov 2014 14:54:10 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
Hi Andrés,
I have also replied to the Octave-maintainers mailing list. Hope that's
ok! See below.
On 25/11/14 10:35, Andrés Prieto wrote:
> Since we need to use "octsympy" in Linux and Windows platforms, we have
> modified the code of file "private/python_header.py" (and subsequently
> "private/python_header.m" ) to avoid the encoding UTF8 problem in Windows
> (https://github.com/cbm755/octsympy/issues/83) and always use the pretty
> print
> command using ASCII characters.
>
> In addition, to keep as simple as possible the output in the Octave command
> window, we'd like to avoid the print of those strings with technical
> information. For instance:
> >> f= sin(x/2)
> f=(sym) "sin(Mul(Rational(1, 2), Symbol('x')))"
>
> How could we modify the source code to avoid that kind of output in the
> command window? Thanks in advance for your answer. Any indication will be
> welcomed.
I think the easiest way to accomplish both these is to modify sympref.m,
as below. Then no need to modify the python_header stuff.
----------------------------------
diff --git a/inst/sympref.m b/inst/sympref.m
index 955e710..54e1dc4 100644
--- a/inst/sympref.m
+++ b/inst/sympref.m
@@ -110,8 +110,8 @@ function varargout = sympref(cmd, arg)
case 'defaults'
settings = [];
settings.ipc = 'default';
- settings.display = 'unicode';
- settings.snippet = true;
+ settings.display = 'ascii';
+ settings.snippet = false;
settings.whichpython = '';
case 'version'
-----------------------------------
Probably I should change the default for "snippets" soonish.
More comments in a later email.
Colin
0xC5326EE5.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
- Re: Octsympy question,
Colin Macdonald <=