Что-то вы гоните насчет "привычного вида формата 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
#LTO/USDT analysis :
#LTO is currently rejecting from a double top resistance zone and showing bearish signs. It is expected to continue declining and test the previous swing low.
TF : 1h
Entry : $0.1124
Target : $0.1079
SL : $0.1151
#LTO | Bounced From Support Level 🧱
How did we find this detection?
1⃣ Visit Detection Analysis at CoinLegs
2⃣ S/R Analysis
3⃣ Variables:
Binance<>USDT<>1h<> Above the S/R Zone<>Weaker
4⃣ Start Analysis
That's it.
Trade easily with free advanced trading tools 💹
#LTO bounced from the Weekly Demand zone,also broken up the trendline and now we are waiting for a pullback to enter the train 🚀
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️
#LTO result
2nd target achieved in just 5 hours ✅✅
One more quick profit 9%💰🤑
👉 The longer you wait more you lose profit. Hurry up 🏃♂
☎️ Contact @MichaelStrategiesVip
🛒Coin added - LTO Network#LTO paired with #USDT on Binance looks good for a long-term investment.
It ranks 345 in the CoinMarketCap rating.
Good fundamentals stuff are expected by the end of the year.
The coin has not pumped and is in a neat uptrend.
The price is at the exit from the resistance zone.
Price projector indicates a rise of $0.15.
Support is the $0.05-0.06 zone.
Growth in my experimental portfolio is expected from 70 to 190%.