Show More
@@ -227,6 +227,9 b' class posixfile_nt(object):' | |||||
227 | # but does not work at all. wrap win32 file api instead. |
|
227 | # but does not work at all. wrap win32 file api instead. | |
228 |
|
228 | |||
229 | def __init__(self, name, mode='rb'): |
|
229 | def __init__(self, name, mode='rb'): | |
|
230 | self.closed = False | |||
|
231 | self.name = name | |||
|
232 | self.mode = mode | |||
230 | access = 0 |
|
233 | access = 0 | |
231 | if 'r' in mode or '+' in mode: |
|
234 | if 'r' in mode or '+' in mode: | |
232 | access |= win32file.GENERIC_READ |
|
235 | access |= win32file.GENERIC_READ | |
@@ -250,9 +253,6 b' class posixfile_nt(object):' | |||||
250 | 0) |
|
253 | 0) | |
251 | except pywintypes.error, err: |
|
254 | except pywintypes.error, err: | |
252 | raise WinIOError(err, name) |
|
255 | raise WinIOError(err, name) | |
253 | self.closed = False |
|
|||
254 | self.name = name |
|
|||
255 | self.mode = mode |
|
|||
256 |
|
256 | |||
257 | def __iter__(self): |
|
257 | def __iter__(self): | |
258 | for line in self.read().splitlines(True): |
|
258 | for line in self.read().splitlines(True): |
General Comments 0
You need to be logged in to leave comments.
Login now