Easy Tutorial
❮ Python Att List Max Python Os Fchown ❯

Python3 os.mkfifo() Method

Python3 OS File/Directory Methods


Overview

The os.mkfifo() method is used to create a FIFO (named pipe) at the specified path with the specified permission mode. The default mode is 0666 (octal).

Syntax

The syntax for the mkfifo() method is as follows:

os.mkfifo(path[, mode])

Parameters

-

path -- The directory to be created.

-

mode -- The numeric mode to set the permissions for the directory.

Return Value

This method does not return any value.

Example

The following example demonstrates the use of the mkfifo() method:

#!/usr/bin/python3

import os, sys

# Directory to be created
path = "/tmp/hourly"

os.mkfifo(path, 0644)

print("Path created")

Executing the above program will output:

Path created

Python3 OS File/Directory Methods

❮ Python Att List Max Python Os Fchown ❯