Oh no... I forgot to search the groups before asking. Sorry every one - this exact same question was asked in three days exactly a year ago from know :-)
The solution was - indentation of the function - just like it still is. My bad. My editor did not indent with 4 space when hitting the tab button. Cheers, David On Jan 21, 5:27 pm, David Møller Hansen <[email protected]> wrote: > > Could you be more specific about the function you wrote and how you > > tried to access it? > > Oh yes, I define the function weil_pairing in the class > EllipticCurvePoint_finite_field like this > > class EllipticCurvePoint_finite_field(EllipticCurvePoint_field): > ... > def weil_pairing(self, Q, n, lin_dep = True): > """ > returns n'th root of unity > ... > > When I then create a point in sage and use . <tab> to get an overview > of available functions then my weil_pairing function is not visible. > > /David > > On Jan 20, 11:22 pm, "Mike Hansen" <[email protected]> wrote: > > > Hello, > > > On Tue, Jan 20, 2009 at 2:17 PM, David Møller Hansen > > > <[email protected]> wrote: > > > I ran sage -br and it seemed to discover the changed file and build > > > a .pyc from it (I guess) but when I tried to run the function from > > > sage it wasn't there. > > > Could you be more specific about the function you wrote and how you > > tried to access it? > > > My guess would be that you defined a global function in > > "ell_point.py". Sage doesn't automatically raise these functions to > > the global namespace so that you can call them from the initial Sage > > prompt. To raise a function to the global namespace, import your > > function into sage/schemes/elliptic_curves/all.py and the Sage > > machinery will do the rest of the work to put it in the global > > namespace. > > > Or, you could do "from sage.schemes.elliptic_curves.ell_point import > > my_function". > > > --Mike --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
