os.access('/path/to/folder', os.W_OK) # W_OK is for writing, R_OK for reading, etc.
stackoverflow.com/questions/2113427/determining-whether-a-directory-is-writeable
Determining Whether a Directory is Writeable
What would be the best way in Python to determine whether a directory is writeable for the user executing the script? Since this will likely involve using the os module I should mention I'm running...
stackoverflow.com
'[공부용]참고 사이트 모음 > [python]' 카테고리의 다른 글
[python] CORS Error 해결법 - Flask 플라스크 예시 (0) | 2021.05.18 |
---|---|
Python 3, asyncio와 놀아보기 - 스크랩 (0) | 2021.05.16 |
[python] Input() VS sys.stdin.readline (0) | 2021.05.04 |
Python - set()에서의 원소 검색은 어떻게 O(1)이 될까? (0) | 2021.04.22 |
[python] map, filter 그리고 lambda (0) | 2021.04.21 |