28.10.2021 Views

Python Tutorial ( PDFDrive )

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Return Value

This method does not return any value.

Example

The following example shows the usage of mkdir() method.

#!/usr/bin/python

import os, sys

# Path to be created

path = "/tmp/home/monthly/daily/hourly"

os.mkdir( path, 0755 );

print "Path is created"

Let us compile and run the above program, this will produce the following result:

Path is created

os.mkfifo(path[, mode])

Description

The method mkfifo() creates a FIFO named path with numeric mode. The default mode is 0666 (octal).The

current umask value is first masked out.

Syntax

Following is the syntax for mkfifo() method:

os.mkfifo(path[, mode])

Parameters

• path -- This is the path, which needs to be created.

• mode -- This is the mode of the named path to be given.

Return Value

This method does not return any value.

Example

The following example shows the usage of mkfifo() method.

# !/usr/bin/python

TUTORIALS POINT

Simply Easy Learning

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!