Python3 os.mkfifo() Method
Python3 OS File/Directory Methods
Overview
The os.mkfifo() method creates a pipe at the specified path and sets the permission mode. The default mode is 0666 (octal).
Syntax
The **mkfifo()** method syntax is as follows:
os.mkfifo(path[, mode])
Parameters
-
path -- The directory to create
-
mode -- The numeric permission mode to set for the directory
Return Value
This method has no return value.
Example
The following example demonstrates the use of the mkfifo() method:
#!/usr/bin/python3
import os, sys
# Created directory
path = "/tmp/hourly"
os.mkfifo( path, 0644 )
print ("路径被创建")
The output of the above program is:
路径被创建