[Tutor] Classes . . .

Dragonfirebane at aol.com Dragonfirebane at aol.com
Wed Nov 3 06:06:07 CET 2004

Hello all,

I was just wondering if it was possible, within a class, to import a module 
without importing it in every method.  I'm trying to write an OOP for tictactoe 
that uses random to select the computer's move when no obvious moves are 
available, and since I separated the program into two files, one for user 
interface, the other for the actual work, importing random in the user interface 
doesn't do squat, nor does importing it before the __init__ of the class, or within 
it . . . any ideas?

Thanks in advance,

Email: dragonfirebane at aol.com
AIM: singingxduck
Programming Python for the fun of it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20041103/af108f68/attachment.htm

More information about the Tutor mailing list