python mkdir
if not os.path.exists(path):
os.mkdir(path)
3.5
4
import os
import errno
if not os.path.exists(value):
try:
os.makedirs(value, 0o700)
except OSError as e:
if e.errno != errno.EEXIST:
raise
Thank you!
4
0
3.89
9
#the os module provides an operating system interface from Python
import os
#prints the name of the operating system
print(os.name)
#prints the absolute path for the module
print(os.getcwd())
Thank you!
9
0
Are there any code examples left?
New code examples in category Python