コード例 #1
0
ファイル: test_basics.py プロジェクト: pshv/execnet
def test_popen_io_readloop(monkeypatch, execmodel):
    sio = BytesIO('test'.encode('ascii'))
    io = Popen2IO(sio, sio, execmodel)
    real_read = io._read

    def newread(numbytes):
        if numbytes > 1:
            numbytes = numbytes-1
        return real_read(numbytes)
    io._read = newread
    result = io.read(3)
    assert result == 'tes'.encode('ascii')
コード例 #2
0
ファイル: gateway_io.py プロジェクト: maheshadba/vDBAHelper
 def __init__(self, args, execmodel):
     self.popen = p = execmodel.PopenPiped(args)
     Popen2IO.__init__(self, p.stdin, p.stdout, execmodel=execmodel)
コード例 #3
0
ファイル: gateway_io.py プロジェクト: rdebliek/oscar
 def __init__(self, args, execmodel):
     self.popen = p = execmodel.PopenPiped(args)
     Popen2IO.__init__(self, p.stdin, p.stdout, execmodel=execmodel)
コード例 #4
0
 def __init__(self, args):
     self.popen = p = Popen(args, stdin=PIPE, stdout=PIPE)
     Popen2IO.__init__(self, p.stdin, p.stdout)
コード例 #5
0
ファイル: gateway_io.py プロジェクト: GoatWalker/SublimeREPL
 def __init__(self, args):
     self.popen = p = Popen(args, stdin=PIPE, stdout=PIPE)
     Popen2IO.__init__(self, p.stdin, p.stdout)