Hi, I want to write a third party module to generate random numbers. It contains a class that includes a method to generate random numbers. The method calls on the NTL library:
r = ntl.ZZ_random(2**512) However, after I installed the module via: sage --python GenRan.py install and imported the module, I get a NameError: sage: from GenRan import * sage: genran = GenRan() sage: genran() NameError: global name 'ntl' is not defined But when I attach the python file directly via: sage: attach GenRan.py sage: genran = GenRan() sage: genran() 32094823048203948204890234 I get the random number I desire. May I know why this is so? I am using Sage version 5.7 on Linux version 2.6. Any help is greatly appreciated. Thanks! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
