Answers for "check check writability of the file"

0

check check writability of the file

os.access('sample.txt', os.W_OK)
#Output False
f = open("sample.txt", "x") # create the file
#check again
os.access('sample.txt', os.W_OK)
#Output True
Posted by: Guest on September-23-2021

Code answers related to "check check writability of the file"

Python Answers by Framework

Browse Popular Code Answers by Language