예제 #1
0
파일: watch.py 프로젝트: jostheim/loom
def protobuf_stream_watch(filename):
    assert os.path.exists(filename)
    proc = subprocess.Popen(
        ['tail', '-f', '-c', '+0', filename],
        stdout=subprocess.PIPE)
    while True:
        yield protobuf_stream_read(proc.stdout)
예제 #2
0
파일: query.py 프로젝트: jostheim/loom
 def receive(self):
     response_string = protobuf_stream_read(self.proc.stdout)
     response = Query.Response()
     response.ParseFromString(response_string)
     return response
예제 #3
0
파일: query.py 프로젝트: truell20/loom
 def receive(self):
     response_string = protobuf_stream_read(self.proc.stdout)
     response = Query.Response()
     response.ParseFromString(response_string)
     return response
예제 #4
0
파일: util.py 프로젝트: dlovell/loom
 def call_string(self, request_string):
     protobuf_stream_write(request_string, self.proc.stdin)
     return protobuf_stream_read(self.proc.stdout)
예제 #5
0
파일: watch.py 프로젝트: manderle01/loom
def protobuf_stream_watch(filename):
    assert os.path.exists(filename)
    proc = subprocess.Popen(['tail', '-f', '-c', '+0', filename],
                            stdout=subprocess.PIPE)
    while True:
        yield protobuf_stream_read(proc.stdout)