如何从python3.5.3中的命名管道读取数据?在
管道的名称和位置是/tmp/shairport-sync-metadata
,任何人都可以查看它,但只能由shairport-sync
用户修改。
其他网站和问题都说要使用os.mkfifo("pipe-location")
,但我得到了这个错误:
>>> import os
>>> os.mkfifo("/tmp/shairport-sync-metadata")
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
os.mkfifo("/tmp/shairport-sync-metadata")
FileExistsError: [Errno 17] File exists
有办法绕过这个问题吗?很抱歉问你这个问题。在
^{} 用于创建fifo。使用^{} 打开/读取已存在的fifo:
相关问题 更多 >
编程相关推荐