I am new in Python programming. I have property consist of getter and setter in a class in file A.
class Histogram:
def getHue(self):
return self.value
def setHue(self, value):
self.varHueHist = value
HueHist = property(getHue, setHue)
I want to access the property from another class in another file which is file B. But after I import the file A and the class inside the file B, the property still can not be accessed.
from Histogram import Histogram
class moment:
var = Histogram()
The property cannot be accessed. When i tried to use automatic completing (Ctrl+space) in my Spyder, the property also didn't show. Unfortunately, when i tried to access the property inside class in the same file with the property, the property is readable. How to call property from inside class in another file?
Both of the files are already in the same folder. Please help. Thanks