On 20/02/06, Kermit Rose <[EMAIL PROTECTED]> wrote:
> NameError: global name 'randint' is not defined
>
>
> In the function that calls randint,   I placed the import command.
>
> def transfac(v):
>   import random
>   a = v[0]

You need to tell python that randint is in the random module.

ie, instead of calling randint(), call random.randint().

Have you been through the tutorial on python.org? It is quite helpful.

--
John.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to