def write(self, msg):
# create the pipe if necessary
try:
os.mkfifo(self.filename)
except OSError as oe:
if oe.errno != errno.EEXIST:
raise
# open it up for reading if necessary
if not self.FIFO:
self.FIFO = open(self.filename, 'w')
print(msg, file=self.FIFO)
###############################################
# Functions #
###############################################
评论列表
文章目录