[Tutor] Question About Subclasses
Deirdre Saoirse
deirdre@deirdre.net
Tue, 27 Feb 2001 17:00:59 -0800 (PST)
On Tue, 27 Feb 2001, Britt Green wrote:
> Then within another file called "game.py" I have the following code:
>
> import Classes
>
> cupboard = Containers("cupboard", 0, "closed")
This is a namespace problem. You can solve it one of two ways:
from Classes import *
cupboard = Containers("cupboard", 0, "closed")
or (better)
import Classes
cupboard = Classes.Containers("cupboard", 0, "closed")
--
_Deirdre deirdre@deirdre.net http://www.deirdre.net
"I love deadlines. I like the whooshing sound they make as they fly by."
- Douglas Adams