(num)
从streams获取另外一个流对象，如果当前为空，则等待
从streams获取另外一个流对象，如果当前为空，则等待
从streams获取另外一个流对象，如果当前为空，则等待
def _get_another_stream(num):
	'''
	从streams获取另外一个流对象，如果当前为空，则等待
	'''
	if num == 0:
		num = 1
	elif num == 1:
		num = 0
	else:
		raise "ERROR"

	while True:
		if streams[num] == 'quit':
			print("can't connect to the target, quit now!")
			sys.exit(1)

		if streams[num] != None:
			return streams[num]
		else:
			time.sleep(1)
def _get_another_stream ( num ) : if num == 0 : num = 1 elif num == 1 : num = 0 else : raise "ERROR" while True : if streams [ num ] == 'quit' : print ( "can't connect to the target, quit now!" ) sys . exit ( 1 ) if streams [ num ] != None : return streams [ num ] else : time . sleep ( 1 )