示例#1
0
 def get_osfhandle(fd):
     from pypy.rlib.rposix import validate_fd
     validate_fd(fd)
     handle = _get_osfhandle(fd)
     if handle == INVALID_HANDLE_VALUE:
         raise WindowsError(ERROR_INVALID_HANDLE, "Invalid file handle")
     return handle
示例#2
0
 def get_osfhandle(fd):
     validate_fd(fd)
     handle = _get_osfhandle(fd)
     if handle == INVALID_HANDLE_VALUE:
         raise WindowsError(ERROR_INVALID_HANDLE, "Invalid file handle")
     return handle
示例#3
0
文件: api.py 项目: Debug-Orz/Sypy
def fwrite(buf, sz, n, fp):
    validate_fd(fileno(fp))
    return _fwrite(buf, sz, n, fp)
示例#4
0
def validate_fd(space, fd):
    try:
        rposix.validate_fd(fd)
    except OSError, e:
        raise wrap_oserror(space, e)
示例#5
0
文件: api.py 项目: Debug-Orz/Sypy
def feof(fp):
    validate_fd(fileno(fp))
    return _feof(fp)
示例#6
0
文件: api.py 项目: Debug-Orz/Sypy
def fread(buf, sz, n, fp):
    validate_fd(fileno(fp))
    return _fread(buf, sz, n, fp)
示例#7
0
def feof(fp):
    validate_fd(fileno(fp))
    return _feof(fp)
示例#8
0
def fread(buf, sz, n, fp):
    validate_fd(fileno(fp))
    return _fread(buf, sz, n, fp)
示例#9
0
def fwrite(buf, sz, n, fp):
    validate_fd(fileno(fp))
    return _fwrite(buf, sz, n, fp)