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

Резултати

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

Пребарај: #hearttoheart

当前筛选 #hearttoheart清除筛选
Love & Relationship Tips ❤ 💖

@loveandrelationshiptips · Post #1722 · 11.10.2025 г., 04:31

🌹 Welcome to Your Daily Dose of Love & Relationship Wisdom! 🌹 Hey there, lovebirds! 💕 Whether you’re navigating the thrilling first dates, deepening a long-term bond, or healing from heartbreak, we’ve got you covered. Every day, we’ll share simple, practical tips to help you build stronger connections, communicate better, and keep the spark alive. ✨ Today’s Tip: Listen More Than You Speak Great relationships start with truly hearing each other out. When your partner talks, put away distractions, make eye contact, and show you care by asking thoughtful questions. It’s amazing how much closer you’ll feel when you really listen. Stay tuned for more heartfelt advice, fun ideas, and inspiring stories to nurture your love life. Remember, love is a journey—not a destination. Let’s walk it together! ❤️ #LoveTips#RelationshipGoals#HeartToHeart#StrongerTogether @loveandrelationshiptips

Love & Relationship Tips ❤ 💖

@loveandrelationshiptips · Post #1723 · 11.10.2025 г., 04:54

💡 Quick Love Quiz: What’s Your Communication Style? 💡 When you and your partner hit a rough patch, how do you usually handle it? A) Talk it out immediately — no matter what B) Need some space before discussing things C) Avoid conflict and hope it blows over D) Get emotional but try to listen Which one sounds like you? Comment your letter and tell us why! Let’s see how different styles shape our relationships and what we can learn from each other. 💬❤️ #LoveTips#RelationshipTalk#CommunicationMatters#LoveQuiz#HeartToHeart @loveandrelationshiptips

Love & Relationship Tips ❤ 💖

@loveandrelationshiptips · Post #1726 · 11.10.2025 г., 08:30

💬 Let’s Talk Heart-to-Heart 💬 True connection happens when we drop the masks and speak from the heart. A heart-to-heart isn’t just about sharing words—it’s about being vulnerable, honest, and open to understanding each other deeply. It’s in these moments that trust grows and relationships transform. Next time you feel the need to connect, try this: pause, breathe, and share what’s really on your mind and in your heart. You might be surprised how much closer it brings you. Remember, every meaningful relationship thrives on genuine conversations. So, don’t hesitate—open up and listen with your heart. ❤️ #HeartToHeart#DeepConnections#RealTalk#LoveAuthentically#SpeakYourTruth @loveandrelationshiptips