codecraig wrote:
My directory structure looks like...
C:\
--> abc.py
--> utils
--> __init__.py
--> CustomThing.py
Ok, CustomThing looks like...
TOP = 0
LEFT = 1
class CustomThing:
def __init__(self):
self.foo = "foo"
so, from abc.py I have
from utils.CustomThing import CustomThing
print CustomThing.TOP
but i get an error: AttributeError: class 'CustomThing' has no
attribute 'TOP'
How can I access those??
You're only importing the class. Try importing the whole module:
from utils import CustomThing
print CustomThing.TOP
--eric
--
http://mail.python.org/mailman/listinfo/python-list