Reputation: 9183
I have use the following code to read a .txt
file:
f = os.open(os.path.join(self.dirname, self.filename), os.O_RDONLY)
And when I want to output the content I use this:
os.read(f, 10);
Which means that this method reads 10 bytes from the beginning of the file on. While I need to read the content as much as it is, using some values such as -1
and so. What should I do?
Upvotes: 1
Views: 148