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

Резултати

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

Пребарај: #hittite

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

@interesting_planet_facts · Post #1207 · 09.01.2026 г., 18:11

🌎 The ancient city of Hattusa, capital of the Hittite Empire, features massive stone walls, elaborate gates, and mysterious underground tunnels. Archaeologists found cuneiform tablets here describing treaties, religions, and daily life. The site was abandoned around 1200 BCE for unknown reasons. ✨ #Hittite⚡#archaeology⚡#mysteries 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #778 · 19.09.2025 г., 00:22

🌎 The Hittite Empire, centered in what is now Turkey, mastered advanced ironworking over 3,200 years ago, enabling powerful tools and weapons. Their capital, Hattusa, was protected by massive stone walls and a unique city gate shaped like a lion’s mouth. ✨ #Hittite⚡#archaeology⚡#iron 👉subscribe Interesting Planet ​