> @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? Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _www: http://www.informatik.uni-bremen.de/~malb _jab: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---