Mercurial > public > mercurial-scm > hg
comparison mercurial/util_win32.py @ 2243:caf2c6ef5b0e
The posixfile implemented using the win32 API should be iterable.
author | Christian Boos <cboos@neuf.fr> |
---|---|
date | Wed, 10 May 2006 11:53:56 +0200 |
parents | 9b42304d9896 |
children | 45aef5ddcdbe |
comparison
equal
deleted
inserted
replaced
2242:78ab05ef1339 | 2243:caf2c6ef5b0e |
---|---|
218 raise WinIOError(err, name) | 218 raise WinIOError(err, name) |
219 self.closed = False | 219 self.closed = False |
220 self.name = name | 220 self.name = name |
221 self.mode = mode | 221 self.mode = mode |
222 | 222 |
223 def __iter__(self): | |
224 for line in self.read().splitlines(True): | |
225 yield line | |
226 | |
223 def read(self, count=-1): | 227 def read(self, count=-1): |
224 try: | 228 try: |
225 cs = cStringIO.StringIO() | 229 cs = cStringIO.StringIO() |
226 while count: | 230 while count: |
227 wincount = int(count) | 231 wincount = int(count) |