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

Пребарај: #v12power

当前筛选 #v12power清除筛选
Auto Life

@revheadcrypto · Post #23 · 01.07.2024 г., 14:59

🔥✨Unleash the Power of Aston Martin Valiant!✨🔥 Embark on a journey of power and precision with the Aston Martin Valiant, driven by a formidable 5.2-liter V12 engine with twin turbocharging, delivering an impressive 745 horsepower (compared to 715 in the Valour). Feel the exhilarating torque of 753 Nm propelling you forward with each twist of the throttle. Get ready to ignite your senses! This fusion of power and performance is harnessed by an exclusive six-speed manual transmission, seamlessly transferring power to the rear wheels, creating an unmatched driving experience. Trust the Aston Martin Valiant to experience the exceptional blend of technology and emotion on the road. Dive into the true embodiment of power, style, and automotive mastery with the Aston Martin Valiant! #AstonMartin#Valiant#V12Power#Performance#DrivingExperience

Auto Life

@revheadcrypto · Post #514 · 23.09.2024 г., 09:02

🚗✨Introducing the Speedster 612 TR Teppista!✨🚗 This stunning masterpiece, based on the iconic Ferrari 250 Testarossa from 1957, is now available in the UAE for an astonishing 823 million rubles! 💰🇦🇪 🔍What makes it so special? - Crafted in 2008 with a sleek carbon body that’s longer and wider than ever! 🖤 - Powered by a roaring V12 engine with a capacity of 5.7 liters! 🏎️💨 A true collector’s dream! 🌟 #Speedster612TR#Ferrari#LuxuryCars#CarCollector#UAE#AutomotiveArt#V12Power#Auto

Auto Life

@revheadcrypto · Post #564 · 10.10.2024 г., 09:50

✨ Introducing the Rolls-Royce Ghost Series II ✨ The updated sedan features a stunning new headlight design and an enlarged grille, reminiscent of the Spectre coupe! 🚗💎 The 22-inch wheels showcase fresh patterns, and a new deep blue shade joins the color palette. 🎨🔵 Inside, experience luxury with a unique bamboo-based fabric, crafted over a year! 🌿🛋️ The media system now operates on the advanced Spirit OS. 📱🎶 Under the hood, the powerful turbocharged V12 engine boasts 563 hp (591 hp in the Black Badge version) and is paired with an 8-speed automatic transmission for smooth rear-wheel drive. 💨⚙️ Elevate your journey with the Ghost Series II! 🌌 #RollsRoyce#GhostSeriesII#Luxury#AutomotiveExcellence#V12Power#Bespoke#EleganceOnWheels#Auto