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

Резултати

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

Пребарај: #eso58049

当前筛选 #eso58049清除筛选
Universe Mysteries 🪐

@cosmomyst · Post #307 · 21.09.2025 г., 15:21

🪐 In the constellation Carina, the galaxy ESO 580-49 was the site of an unusually long gamma-ray burst in 2013—lasting over 7 hours, far exceeding the typical seconds-long flashes seen in most bursts. Gamma-ray bursts are colossal explosions from massive stars collapsing or merging, sending out jets of the most energetic light in the universe, and the event in ESO 580-49 shows just how varied and powerful these cosmic blasts can be. ✨ #gamma⚡#ESO58049⚡#explosions⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​