小白教程
所有教程
关于
Search
172.69.59.135
172.69.59.135
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Python3 os mkfifo”的源代码
本页内容
上一节:
Python3_os_mkdir
下一节:
Python3_os_mknod
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:os.mkfifo(path[, mode])}}[[Category:python3 os file methods|36]] = Python3 os.mkfifo() 方法 = [[python3 os file methods|Python3 OS 文件/目录方法]] === 概述 === os.mkfifo() 方法用于创建指令路径的管道,并设置权限模式。默认的模式为 0666 (八进制)。 === 语法 === '''mkfifo()'''方法语法格式如下: <sample title="" desc="" lang="python" hererun="1"> os.mkfifo(path[, mode]) </sample> === 参数 === * '''path''' -- 要创建的目录 * '''mode''' -- 要为目录设置的权限数字模式 === 返回值 === 该方法没有返回值。 == 以下实例演示了 mkfifo() 方法的使用: <sample title="" desc="" lang="python" hererun="1"> #!/usr/bin/python3 import os, sys # 创建的目录 path = "/tmp/hourly" os.mkfifo( path, 0644 ) print ("路径被创建") </sample> 执行以上程序输出结果为: <sample title="" desc="" lang="python" hererun="1"> 路径被创建 </sample> [[python3 os file methods|Python3 OS 文件/目录方法]]
返回至“
Python3 os mkfifo
”。
上一节:
Python3_os_mkdir
下一节:
Python3_os_mknod