About the Tutorial



Download 2,85 Mb.
Pdf ko'rish
bet194/234
Sana28.05.2022
Hajmi2,85 Mb.
#614232
1   ...   190   191   192   193   194   195   196   197   ...   234
Bog'liq
python3 tutorial 060821094426

os.mkdir() Method 
Description 
The method mkdir() create a directory named path with numeric mode mode. The default 
mode is 0777 (octal). On some systems, mode is ignored. Where it is used, the current 
umask value is first masked out. 


Python 3 
290 
Syntax 
Following is the syntax for mkdir() method- 
os.mkdir(path[, mode]) 
Parameters 

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

mode
- This is the mode of the directories to be given. 
Return
Value
This method does not return any value. 
 
Example 
The following example shows the usage of mkdir() method. 
#!/usr/bin/python3 
import os, sys 
# Path to be created 
path = "/tmp/home/monthly/daily/hourly" 
os.mkdir( path, 0755 ); 
print "Path is created" 
When we run the above program, it produces the following result- 
Path is created 
os.mkfifo() Method 
Description 
The method 
mkfifo()
create a FIFO named path with numeric mode. The default mode is 
0666 (octal).The current umask value is first masked out. 
FIFOs are pipes that can be accessed like regular files. FIFOs exist until they are deleted 
Syntax 
Following is the syntax for mkfifo() method- 
os.mkfifo(path[, mode]) 


Python 3 
291 
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/python3 
import os, sys 
# Path to be created 
path = "/tmp/hourly" 
os.mkfifo( path, 0644 ) 
print ("Path is created") 
When we run the above program, it produces the following result- 
Path is created 

Download 2,85 Mb.

Do'stlaringiz bilan baham:
1   ...   190   191   192   193   194   195   196   197   ...   234




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish