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

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #281 · 18 авг.

Что-то вы гоните насчет "привычного вида формата 755 и 644". Я вот вообще не понял что это!😳 Действительно, что означают цифры которые мы получили в прошлом посте? Это кодировка, заключающая в себе режимы доступа к файлу. Подробней можно почитать в статье про chmod. Там можно увидеть альтернативное обозначение того же самого с помощью символов r w x, что значит чтение, запись, исполнение. Чтобы преобразовать восьмеричное число в такое обозначение в Python есть готовая функция >>> stat.filemode(0o755) '?rwxr-xr-x' Мы видим 3 группы по 3 символа, дающие 3 типа доступа для 3 типов юзеров. А что за знак вопроса в начале? Давайте передадим в эту функцию необрезанное значение от os.stat >>> stat.filemode(os.stat(path).st_mode) 'drwxr-xr-x' Это данные, которые мы безжалостно обрезали в прошлый раз😼 Первый символ обозначает тип объекта. Это может быть файл (-), директория (d) или симлинк (l). Вот простая схема данной кодировки [1][3][3][3] │ │ │ │ │ │ │ └──> Others Permissions │ │ └─────> Group Permissions │ └────────> Owner Permissions └───────────> File Type (разверните экран если вы с телефона) Если вы попробуете получить пермишены для симлинка то получите пермишены для файла >>> path = '.venv/bin/python3' >>> stat.filemode(os.stat(path).st_mode) '-rwxr-xr-x' Чтобы получить свойства именно симлинка, нужно это явно указать >>> stat.filemode(os.stat(path, follow_symlinks=False).st_mode) 'lrwxrwxrwx' #tricks#basic

Резултати

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

Пребарај: #trappist1

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

@cosmomyst · Post #311 · 22.09.2025 г., 12:21

🪐 The exoplanet TRAPPIST-1c, located about 40 light-years away, is a rocky world baked by its star to temperatures hot enough to melt lead—around 230°C—despite being only slightly larger than Earth. With a tight orbit of just 2.4 days, TRAPPIST-1c endures constant stellar radiation, making its surface a realm of extreme heat and intense space weather unlike anything found on our planet. ✨ #exoplanets⚡#extremes⚡#TRAPPIST1⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #192 · 26.08.2025 г., 13:11

🪐 In 2017, astronomers discovered a group of odd, repeating radio signals coming from TRAPPIST-1, an ultracool dwarf star with seven Earth-sized exoplanets just 39 light-years away. While these signals turned out to be natural phenomena related to the star's magnetic activity, TRAPPIST-1 remains one of the most intriguing targets in the search for alien life because several of its planets orbit in the habitable zone, where liquid water could exist. ✨ #aliens⚡#exoplanets⚡#trappist1⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #412 · 12.10.2025 г., 15:21

🪐 The James Webb Space Telescope has discovered that the exoplanet TRAPPIST-1b, one of seven planets orbiting the star TRAPPIST-1 about 41 light-years away, has no detectable atmosphere. Webb’s sensitive instruments showed that the planet’s dayside is hotter than expected if it had an atmospheric blanket, suggesting its surface is bare rock—shaping new ideas about the harsh conditions on close-orbiting worlds around small stars. ✨ #exoplanets⚡#trappist1⚡#webb⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #725 · 28.03.2026 г., 22:21

🪐 In the TRAPPIST-1 system, about 40 light-years away, seven Earth-sized exoplanets orbit a cool, dim star, and at least three of them lie in the star’s “habitable zone”—the region where temperatures might allow liquid water to exist on their surfaces. This cluster of small worlds makes TRAPPIST-1 one of the top real candidates in the search for places where life could exist beyond our solar system. ✨ #TRAPPIST1⚡#exoplanets⚡#habitable⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​