TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

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

Hashtags

Резултати

Пронајдени 8 слични објави

Пребарај: #lighthouse

当前筛选 #lighthouse清除筛选
Interesting Planet 🌍

@interesting_planet_facts · Post #1338 · 12.03.2026 г., 12:11

🌎 On the island of Märket in the Baltic Sea, the Finland-Sweden border cuts through a tiny lighthouse. The border was shifted in 1985 so both nations could share the landmark, creating a zigzag international line only 500 meters long. ✨ #borders⚡#geography⚡#lighthouse 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1095 · 03.12.2025 г., 12:11

🌎 The Flannan Isles Lighthouse mystery remains unsolved: in December 1900, three lighthouse keepers disappeared from a remote Scottish island. No bodies or clues to their fate were found, and weather records suggest a sudden storm struck the area. The lighthouse was left locked, with meals untouched and logs stopping abruptly on December 15. ✨ #mystery⚡#lighthouse⚡#Scotland 👉subscribe Interesting Planet 👉more Channels ​