예제 #1
0
def makeStdErr():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    tty = ruv.alloc_tty(uv_loop, 2, False)
    # ruv.TTYSetMode(tty, ruv.TTY_MODE_RAW)

    return StreamDrain(ruv.rffi.cast(ruv.stream_tp, tty), vat)
예제 #2
0
def makeStdErr():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    tty = ruv.alloc_tty(uv_loop, 2, False)
    # ruv.TTYSetMode(tty, ruv.TTY_MODE_RAW)

    return StreamDrain(ruv.rffi.cast(ruv.stream_tp, tty), vat)
예제 #3
0
def makeStdOut():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    tty = ruv.alloc_tty(uv_loop, 1, False)
    # XXX works exactly as expected, including disabling most TTY signal
    # generation
    # ruv.TTYSetMode(tty, ruv.TTY_MODE_RAW)

    return StreamDrain(ruv.rffi.cast(ruv.stream_tp, tty), vat)
예제 #4
0
파일: stdio.py 프로젝트: washort/typhon
def makeStdIn():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    stdinKind = ruv.guess_handle(0)
    if stdinKind == ruv.HANDLE_TTY:
        stdin = ruv.alloc_tty(uv_loop, 0, True)
        return StreamFount(ruv.rffi.cast(ruv.stream_tp, stdin), vat)
    else:
        return FileFount(ruv.alloc_fs(), 0, vat)
예제 #5
0
def makeStdOut():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    tty = ruv.alloc_tty(uv_loop, 1, False)
    # XXX works exactly as expected, including disabling most TTY signal
    # generation
    # ruv.TTYSetMode(tty, ruv.TTY_MODE_RAW)

    return StreamDrain(ruv.rffi.cast(ruv.stream_tp, tty), vat)
예제 #6
0
파일: stdio.py 프로젝트: dckc/typhon
def makeStdIn():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    stdinKind = ruv.guess_handle(0)
    if stdinKind == ruv.HANDLE_TTY:
        stdin = ruv.alloc_tty(uv_loop, 0, True)
        return StreamFount(ruv.rffi.cast(ruv.stream_tp, stdin), vat)
    else:
        return FileFount(ruv.alloc_fs(), 0, vat)
예제 #7
0
파일: stdio.py 프로젝트: zarutian/typhon
 def stderr(self):
     vat = currentVat.get()
     uv_loop = vat.uv_loop
     kind = ruv.guess_handle(2)
     if kind == ruv.HANDLE_TTY:
         stderr = ruv.alloc_tty(uv_loop, 2, False)
         stream = ruv.wrapStream(ruv.rffi.cast(ruv.stream_tp, stderr), 1)
         return TTYSink(stderr, stream, vat)
     else:
         return FileSink(2, vat)
예제 #8
0
파일: stdio.py 프로젝트: zarutian/typhon
 def stdin(self):
     vat = currentVat.get()
     uv_loop = vat.uv_loop
     kind = ruv.guess_handle(0)
     if kind == ruv.HANDLE_TTY:
         stdin = ruv.alloc_tty(uv_loop, 0, True)
         stream = ruv.wrapStream(ruv.rffi.cast(ruv.stream_tp, stdin), 1)
         return TTYSource(stdin, stream, vat)
     else:
         return FileSource(0, vat)
예제 #9
0
파일: stdio.py 프로젝트: dckc/typhon
 def stderr(self):
     vat = currentVat.get()
     uv_loop = vat.uv_loop
     kind = ruv.guess_handle(2)
     if kind == ruv.HANDLE_TTY:
         stderr = ruv.alloc_tty(uv_loop, 2, False)
         stream = ruv.wrapStream(ruv.rffi.cast(ruv.stream_tp, stderr), 1)
         return StreamSink(stream, vat)
     else:
         return FileSink(ruv.alloc_fs(), 2, vat)
예제 #10
0
파일: stdio.py 프로젝트: dckc/typhon
 def stdin(self):
     vat = currentVat.get()
     uv_loop = vat.uv_loop
     kind = ruv.guess_handle(0)
     if kind == ruv.HANDLE_TTY:
         stdin = ruv.alloc_tty(uv_loop, 0, True)
         stream = ruv.wrapStream(ruv.rffi.cast(ruv.stream_tp, stdin), 1)
         return StreamSource(stream, vat)
     else:
         return FileSource(ruv.alloc_fs(), 0, vat)
예제 #11
0
파일: stdio.py 프로젝트: dckc/typhon
def makeStdErr():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    stderrKind = ruv.guess_handle(2)
    if stderrKind == ruv.HANDLE_TTY:
        tty = ruv.alloc_tty(uv_loop, 2, False)
        # ruv.TTYSetMode(tty, ruv.TTY_MODE_RAW)
        return StreamDrain(ruv.rffi.cast(ruv.stream_tp, tty), vat)
    else:
        return FileDrain(ruv.alloc_fs(), 2, vat)
예제 #12
0
파일: stdio.py 프로젝트: washort/typhon
def makeStdErr():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    stderrKind = ruv.guess_handle(2)
    if stderrKind == ruv.HANDLE_TTY:
        tty = ruv.alloc_tty(uv_loop, 2, False)
        # ruv.TTYSetMode(tty, ruv.TTY_MODE_RAW)
        return StreamDrain(ruv.rffi.cast(ruv.stream_tp, tty), vat)
    else:
        return FileDrain(ruv.alloc_fs(), 2, vat)
예제 #13
0
 def stdout(self):
     vat = currentVat.get()
     uv_loop = vat.uv_loop
     kind = ruv.guess_handle(1)
     if kind == ruv.HANDLE_TTY:
         stdout = ruv.alloc_tty(uv_loop, 1, False)
         stream = ruv.wrapStream(ruv.rffi.cast(ruv.stream_tp, stdout), 1)
         return TTYSink(stdout, stream, vat)
     else:
         return FileSink(1, vat)
예제 #14
0
파일: stdio.py 프로젝트: dckc/typhon
def makeStdOut():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    stdoutKind = ruv.guess_handle(1)
    if stdoutKind == ruv.HANDLE_TTY:
        tty = ruv.alloc_tty(uv_loop, 1, False)
        # XXX works exactly as expected, including disabling most TTY signal
        # generation
        # ruv.TTYSetMode(tty, ruv.TTY_MODE_RAW)
        return StreamDrain(ruv.rffi.cast(ruv.stream_tp, tty), vat)
    else:
        return FileDrain(ruv.alloc_fs(), 1, vat)
예제 #15
0
파일: stdio.py 프로젝트: washort/typhon
def makeStdOut():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    stdoutKind = ruv.guess_handle(1)
    if stdoutKind == ruv.HANDLE_TTY:
        tty = ruv.alloc_tty(uv_loop, 1, False)
        # XXX works exactly as expected, including disabling most TTY signal
        # generation
        # ruv.TTYSetMode(tty, ruv.TTY_MODE_RAW)
        return StreamDrain(ruv.rffi.cast(ruv.stream_tp, tty), vat)
    else:
        return FileDrain(ruv.alloc_fs(), 1, vat)
예제 #16
0
def makeStdIn():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    tty = ruv.alloc_tty(uv_loop, 0, True)

    return StreamFount(ruv.rffi.cast(ruv.stream_tp, tty), vat)
예제 #17
0
def makeStdIn():
    vat = currentVat.get()
    uv_loop = vat.uv_loop
    tty = ruv.alloc_tty(uv_loop, 0, True)

    return StreamFount(ruv.rffi.cast(ruv.stream_tp, tty), vat)