I have 2 classes in 2 different files:
fileA.py
class A(self):
def __init__(self):
pass
def func_A(self):
print '10'
fileB.py
import fileA
class B(self):
def __init__(self):
pass
def func_B(self):
print '10'
if __name__ == '__main__':
obj = B()
# Call func_A
fileA.func_A()
The call to func_A fails.
AttributeError: 'module' object has no attribute 'func_A'
How can I make it work correctly?
func_Aisn't just in modulefileAit's on an instance of classAfrom modulefileA.