python check if the file is writable code example
Example: python check if file is writable
os.access('path/to/file/or/folder', os.W_OK) # Write
os.access('path/to/file/or/folder', os.R_OK) # Read
os.access('path/to/file/or/folder', os.W_OK) # Write
os.access('path/to/file/or/folder', os.R_OK) # Read