Follow

os module || python interactions with os(operating system)

python os module provides interaction with operating system. os module use for function of operating system. os module is python utility module.os module use to creating file , operations on file, use for cmd working.
os functions use
os.name os name
os.mkdir create directory
os.getcwd current working directory
os.cwd(c://...) change working directory
os.rmdir remove directory
os.popen(file name) open file
os.close(file name) close file
os.rename(file name) rename of file
os.listdir() list of file in diractory
os.path.getsize() size of file
os.cpu_count no. of core count
os.curdir() working directory name
os.getpid() current process pid
os.getlogin login name
os.open(file name) open a file

No comments:

Post a Comment

Tell us how you like it.