lackhead.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:challenges 作者: py-study-group 项目源码 文件源码
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                                   #
###############################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号