示例#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)