ring r=0,(x,y,z,a,b),lp; poly f=37x3y+x2yz; ideal i=f,f*f,f*f*f; LIB "poly.lib"; ideal i2=cyclic(5); print(i2); LIB("/Users/michael/sing3/modules/python/python_module.so"); Python_module::python("from interpreter import singular_globals_proxy #import psyco import sys sys.argv=['Singular'] #import sre_compile #psyco.bind(sre_compile._optimize_charset) #psyco.log() #psyco.profile() from CAS.singular import * from context import * context=Context() import CD.polyd as polyd import CAS.singular context.addCDImplementation(polyd.implementation) from CD.polyd import groebnersym inter=singular_globals_proxy() cyc3=encodeIdeal(singular.i2) ord=encodeOrdering(singular.r) gcall=OMApply(groebnersym,[ord,cyc3]) gcout=open('cyc3om','w') gcout.write(context.XMLEncodeObject(gcall)) gcout.close() print 'now calculating GB' omin=context.XMLEncodeObject(gcall) from omxmlreader import * def inout(context, infn): doc=readFile(infn) builder=OMFromXMLBuilder() doc=builder.build(doc) doc=context.evaluate(doc) output=context.XMLEncodeObject(doc) gcout=open('cyc3om.out','w') gcout.write(output) gcout.close() inout(context,'cyc3om') "); $