Lines Matching defs:read
47 >>> data = file.read(5) # Pass no arg to read everything.
57 * Only read ("r") mode is supported. Although write ("w") mode doesnt make
109 def read(self, n = -1):
110 assert self.inputStream is not None, "Not setup for read!"
113 return str(self.inputStream.read(n))
120 lines = self.read().split("\n")
212 def read(self, n = -1):
213 return _File.read(self, n)
222 # read in a couple of chunks, just to test that our various arg combinations work.
223 got = file.read(3)
224 got = got + file.read(300)
225 got = got + file.read(0)
226 got = got + file.read()
231 # read in a couple of chunks, just to test that our various arg combinations work.
237 num = file.inputStream.read(buffer)
252 # Make sure Python can read it OK.
254 assert f.read() == data, "Eeek - Python could not read the data back correctly!"
258 got = str(test_file.read())
263 got = test_file.read(10) + test_file.read()
272 # Make sure Python can read it OK.
274 assert f.read() == data, "Eeek - Python could not read the data back correctly after recreating an existing file!"
284 # check what we read is the same as when
285 # we read this file "normally"
289 expected = open(fname, "rb").read()
308 got = test_file.read()