##// END OF EJS Templates
windows: adjust doc string and comments of posixfile()...
Adrian Buehlmann -
r24069:c6666395 default
parent child Browse files
Show More
@@ -28,10 +28,10 b' unlink = win32.unlink'
28 28 umask = 0022
29 29 _SEEK_END = 2 # os.SEEK_END was introduced in Python 2.5
30 30
31 # wrap osutil.posixfile to provide friendlier exceptions
32 31 def posixfile(name, mode='r', buffering=-1):
32 '''Open a file with even more POSIX-like semantics'''
33 33 try:
34 fp = osutil.posixfile(name, mode, buffering)
34 fp = osutil.posixfile(name, mode, buffering) # may raise WindowsError
35 35
36 36 # The position when opening in append mode is implementation defined, so
37 37 # make it consistent with other platforms, which position at EOF.
@@ -40,8 +40,8 b" def posixfile(name, mode='r', buffering="
40 40
41 41 return fp
42 42 except WindowsError, err:
43 # convert to a friendlier exception
43 44 raise IOError(err.errno, '%s: %s' % (name, err.strerror))
44 posixfile.__doc__ = osutil.posixfile.__doc__
45 45
46 46 class winstdout(object):
47 47 '''stdout on windows misbehaves if sent through a pipe'''
General Comments 0
You need to be logged in to leave comments. Login now