Okay, Here's some code (in case anyone is interested, this was related to a problem that appeared on the math-fun mailing list):
def ECurve(n,k): vars = ['a%d_%d'%(n,i) for i in range(k)] v = R.gens() F = FractionField(K) S.<x> = F[] f = (x^n-1)//(x-1) g = x^k + sum([v[i]*x^i for i in range(k)]) c = (f%g).coefficients() return R.ideal([z.numerator() for z in c[1:]).groebner_basis() def Curve1(n,k) I = ECurve(n,k) if len(I) == 0: return I R = I[0].parent() II = R.ideal(I) J = II.elimination_ideal(R.gen()[:-2]) S.<b1,b2> = QQ[] phi = R.hom((k-2)*[S(0)] + [b1,b2]) return Curve(phi(J.gens()[0])) C = Curve1(9,3) print C.genus() On Aug 5, 4:12 pm, William Stein <wst...@gmail.com> wrote: > On Wed, Aug 5, 2009 at 1:09 PM, VictorMiller <victorsmil...@gmail.com>wrote: > > > > > > > I was asking SAGE to do a calculation that I knew was probably > > laborious -- I had a plane curve (over Q) and I wanted its genus. I > > defined it with C=Curve(equation_in_two_variables) and then typed > > > C.genus() > > > after a while (I was in the notebook) I just got the mysterious error > > message: > > > delaybeforesend: 0 > > > when I expanded it, at the end there was a lot of stuff, but the > > relevant line was > > > pexpect.TIMEOUT: Timeout exceeded in read_nonblocking(). > > <pexpect.spawn instance at 0xa1c170c> > > command: /u/victor/sage/local/bin/Singular > > > So, there are two questions: > > > a) is it possible to give a more informative error message. It seems > > obvious that singular just took > > too long in getting back to sage. > > This is not obvious to me. That is really weird. Sage should wait forever > for any subprocess to return. The time limit on reading is purposely > disabled. Weird. Maybe the subprocess really crashed and the error > message is just wrong? Or maybe something is screwy with pexpect. Can > you post code? Has anybody else seen anything similar? > > William > > > b) is it possible to give a longer timeout (if I really want the > > answer)? > > > Victor > > -- > William Stein > Associate Professor of Mathematics > University of Washingtonhttp://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---