What I have is a module data.py
that imports another module element.py
. data.py
needs the "element" class stored in element.py
while the "element" class in element.py
is a subclass of a template "element" class in data.py
. and data.py
is run first.
so:
data.py
import element.py
class templateElement(object):
# all the class stuff here
class templateOtherObject(object):
# needs element.py's custom element object methods and data
element.py
import data.py
class element(data.templateElement):
# class stuff here
So how do I get it to where they can both get the information from each other while not having the template methods each designated to their own file. or would they have to be?
How could I set up a template file while still being able to use the custom classes in a different template class on the template file?