python多个同时fifo

  • 本文关键字:fifo python python
  • 更新时间 :
  • 英文 :


如何使用Python3打开多个fifo?下面的代码很简单,但它堆叠在最后一行,等待(?(。。。请帮忙吗?

toAgent = ['ABCD', 'EFGH', 'IJKL', 'MNOP',]
def createPipe():
for i in range(0, len(toAgent)):
#print(i)
fifoName = '../tmp/' + toAgent[i]       
if not os.path.exists(fifoName):
os.mkfifo(fifoName) 
pipeName = 'pipe_' + str(i)
print(pipeName, fifoName)
pipeName = os.open(fifoName, os.O_WRONLY )
import os
toAgent = ['ABCD', 'EFGH', 'IJKL', 'MNOP',]
def createPipe():
for i in range(0, len(toAgent)):
#print(i)
fifoName = '../tmp/' + toAgent[i]
if not os.path.exists(fifoName):
os.mkfifo(fifoName)
pipeName = 'pipe_' + str(i)
print(pipeName, fifoName)
pipeName = os.open(fifoName, os.O_WRONLY )
createPipe()

最新更新