Lets say i have something like this: This is file tree.py:
class leaf(): def green(): x = 100 This is file view.py:
from tree import leaf.green g = green() print g.x How do i get the variable form subclass green I know for class its just:
This is file tree.py:
class leaf(): x = 100 This is file view.py:
from tree import leaf class view(): g = leaf() print g.x I understand how to do it if both classes are in the same file. But i dont understand in two seprate files. Thanks, John
classC is aclassthat inherits from C. Adefinside aclassis a method.