On Saturday 17 December 2011, Jean-François Biasse wrote:
> Hi,
>
> I am using Sage to pass elements between gp and Magma. It works just
> fine, except for the messages on the standard output.
>
> My version of gp should print some timings, but when I call it through
> SAGE, this doesn't work.
>
> I believe this behavior is ruled by interfaces/gp.py, but I am not
> experienced enough to make the proper modifications.
>
> If I do :
> sage : from sage.interfaces.expect import StdOutContext
> sage : ctx = StdOutContext(gp)
> sage : with ctx : gp.my_gp_function(...)
All this does is to also print *all* communication between Sage and GP, that's
why you are seeing this useless stuff.
> I get my messages, but with a whole bunch of useless stuffs.
>
> I also have the option to do
> sage : gp.eval('\\g 1')
> that turns the debug mode on, but I have the same problem : it prints
> out too many things.
You'd probably have to write something similar to
http://hg.sagemath.org/sage-
main/file/9e29a3d84c48/sage/interfaces/magma.py#l2740
which'd do the filtering for you, e.g. filter all the inputs (starting with
"?" i guess), filter all the synchronisation code etc.
>
> Thanks
> Jean-François
Cheers,
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: [email protected]
--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org