‘’‘
def cmd(cmd):
return subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
’‘’
‘’‘
appium = cmd("appium -p %s -bp %s -U %s" % (aport, bpport, self.device)) # 启动 appium
while True:
appium_line = appium.stdout.readline().strip()
if 'listener started' in appium_line:
break
’‘’
以上代码在 MAC 上运行,运行到 appium_line = appium.stdout.readline().strip() 代码就一定阻塞在这里,麻烦有神解答下吗,谢谢