Mar-27-2017, 04:20 PM
Hi,
I have this function, but I can't get it to work:
What am I doing wrong please?
I have this function, but I can't get it to work:
class DataTest( object ): def testReadData( self ): path = '/home/pi/Desktop/test.txt' with open(path, 'r') as f: f.read()Yet when I try to get the text from the file from outside the class:
test = DataTest.testReadData(self) print(test)It returns None
What am I doing wrong please?