while 1:
try:
#read from stdin
line = sys.stdin.readline()
except KeyboardInterrupt:
break
if not line:
break
fields = line.split('#')
...
Run Code Online (Sandbox Code Playgroud)
我如何跳过第一行阅读stdin?
我正在收听流量并不断将这些流量数据插入到elasticsearch中.我想用我的python脚本搜索这些数据.
这是我的python代码的一小部分,
test = es.search(
index="argus_data",
body=dict(query=search_body["query"],
size= "1000") # I want to do this "unlimited"
)
pprint(test)
Run Code Online (Sandbox Code Playgroud)
我不知道我的体型是多少,因为我不断有新的数据.如何管理这种情况请帮我解决这个问题,谢谢.