@anatomyarthub · Post #3332 · 05.08.2024 г., 13:12
#руки#hands @anatomyarthub
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #214 · 12 фев.
Как правильно проверить атрибуты доступа файла? То есть доступна ли запись в файл или является ли он исполняемым? Для этого в Python есть функция os.access() Проверять так: os.access(path, flag) Функция вернёт bool в зависимости от наличия указанного флага. Всего есть 4 флага проверки: os.F_OK - наличие файла на диске os.R_OK - доступ на чтение os.W_OK - доступ на запись os.X_OK - доступ на исполнение Например, вместо try-except лучше делать так (пример из документации): if os.access("myfile", os.R_OK): with open("myfile") as fp: return fp.read() #basic#libs
Пребарај: #hands
@anatomyarthub · Post #3332 · 05.08.2024 г., 13:12
#руки#hands @anatomyarthub
@anatomyarthub · Post #2993 · 28.04.2024 г., 07:12
#руки#hands @anatomyarthub
@anatomyarthub · Post #2703 · 29.02.2024 г., 12:53
#руки#hands @anatomyarthub
@Wallpaper_INT · Post #46817 · 11.07.2025 г., 09:30
#Hands#Flowers#Aesthetic#Purple#4K @Wallpaper_INT
@anatomyarthub · Post #2104 · 10.11.2023 г., 11:11
#анатомия#руки#anatomy#hands @anatomyarthub
@anatomyarthub · Post #1271 · 19.07.2023 г., 14:49
#анатомия#руки#anatomy#hands @anatomyarthub
@anatomyarthub · Post #1133 · 11.07.2023 г., 08:20
#анатомия#руки#anatomy#hands @anatomyarthub
@anatomyarthub · Post #841 · 16.06.2023 г., 11:00
#анатомия#руки#anatomy#hands @anatomyarthub
@anatomyarthub · Post #303 · 21.05.2023 г., 06:04
#анатомия#руки#anatomy#hands @anatomyarthub
@anatomyarthub · Post #152 · 17.05.2023 г., 07:05
#анатомия#руки#anatomy#hands @anatomyarthub
@anatomyarthub · Post #106 · 13.05.2023 г., 09:50
#анатомия#руки#anatomy#hands @anatomyarthub
@anatomyarthub · Post #3725 · 13.10.2024 г., 12:02
#арт#руки#art#hands @anatomyarthub