On Nov 25, 2007 3:27 AM, Martin Albrecht <[EMAIL PROTECTED]> wrote:
>
> > @Martin Albrecht:
> > - Is there a reasonable way to fix this in the interface?
>
> Hi, the 'trivial' way to fix it, is to implement a Python function for
> SinguleElement called invariant_ring which calls the Singular function,
> parses the output and returns a tuple. If you call A.invariant_ring the
> Singular function is only called directly if there is no Python function with
> the same name.
>
> A better - and I guess doable - approach is to track down why it fails and fix
> it.
>
> > - If not: What could we do on the side of Singular to make the return
> > of a tuple (like return(P,S,IS)) comprehensible for the interface? I
> > guess "return(list(P,S,IS))" would work, but i'm not sure if this
> > change of syntax wouldn't have nasty consequences for existing
> > applications.
> >
> > There is a very clumsy way to pull the output of invariant_ring into
> > sage:
> > First, define A and R as above. Then say
> >   singular.eval('matrix P,S,IS=invariant_ring(%s)'%(A.name()))
> >   P=singular('P')
> >   S=singular('S')
> >   IS=singular('IS')
> >
> > But definitely i do think the correct syntax should be
> > P,S,IS=A.invariant_ring()
>
> and this is definitely possible either by doing what you are doing above
> within a Python wrapper function or by fixing that issue.
>
> > Now, another question on the Singular interface:
> > In Singular, doing
> >  matrix P,S,IS = invariant_ring(A,1);
> > would make Singular to additionally print information about the
> > progress of computations (which, in big examples, might be nice to
> > have).
> >
> > However, when i use the Singular interface, i can not see such
> > informations. Where are they gone?
>
> The information is printed but ignored because pexpect expects
> Singular 'output' and ignores the rest. I am no pexpect expert so I don't
> know how to fix it. It would very very useful though. Anyone else has any
> idea?

I think this would be possible to implement, by modifying
interfaces/singular.py.
Please open a trac ticket.   It's easiest if we just have it print out
the result of
all the verbose output, rather than all of it along the way as it is
output by singular,
though the latter would also be possible.   With pseudo-tty's it is
possible to do
anything you could really imagine doing by hand while physically using
a terminal
to interact with singular.  Anything.

-- William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to