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 слични објави

Пребарај: #c4

当前筛选 #c4清除筛选
GitHub Trends

@githubtrending · Post #15471 · 04.02.2026 г., 20:00

#typescript#architecture#architecture_as_code#c4#diagrams LikeC4 lets you describe software architecture in simple code files that automatically generate live, up-to-date diagrams you can visualize, collaborate on, and evolve. Inspired by C4 model, it offers flexible custom elements, notations, and nested levels tailored to your needs—run `npx likec4 start` for instant previews via CLI, VSCode extension, or web viewer. You benefit by ending stale docs, ensuring diagrams match your code as the single truth, saving time on manual drawing, enabling easy Git diffs/reviews, and boosting team understanding of complex systems. https://github.com/likec4/likec4