Для тех кто пишет расширения на PyQt/PySide для CG-софтов.
Когда я только начинал писать тулзы под Maya (тогда еще версия 2010-2011) мне приходилось ручками ставить PyQt4 под Maya. Даже написал мануалы по установке на своём сайте. Но потом стал доступен из коробки PySide и позже он обновится до PySide2. Для некоторых систем была поддержка PyQt5.
И как простому разработчику поддерживать этот зоопарк? Ведь хочется чтобы тул работал на любой версии (вы тоже делали модуль что-то типа import_qt.py?😁)
На помощь приходит проект Qt.py который поставил себе цель унифицировать использование Qt-биндингов вне зависимости от среды где запускается код. Те, кто давно пишут на Qt, скорее всего знают этот проект.
Он стал стандартом для CG-индустрии и используется в топовых студиях и проектах.
Qt․py помогает запускать один и тот же код на разных платформах с разными вариантами Qt-библиотек. Это может быть как интеграция в CG-софт, так и переносимость стендалонов между разными платформами с разными версиями Python.
Я решил рассказать о некоторых особенностях работы с этой библиотекой.
Сегодня о том, как установить и использовать Qt․py и что это вам даёт.
Установка
pip install Qt.py
Чтобы начать использовать Qt․py в коде достаточно заменить импорт вашего варианта Qt-биндинга на Qt․py
from [PySide|PyQt4|PySide2|PyQt5] import QtWidgets
=>
from Qt import QtWidgets
Теперь ваш код будет поддерживать любой вариант биндинга Qt в Python.
При этом не потребуется использовать if-else конструкции под разные версии. Все вызовы теперь одинаковы.
Всё что нужно сделать, это написать его по правилам PySide2. Именно эта версия была взята за основу.
Приоритет импорта такой:
1. PySide2
2. PyQt5
3. PySide
4. PyQt4
Что именно загрузилось можно посмотреть в переменной __binding__
>>> import Qt
>>> Qt.__binding__
'PySide2'
Приоритет имопрта можно изменить через переменные QT_PREFERRED_BINDING и QT_PREFERRED_BINDING_JSON. Причем под каждый проект оверрайды можно настраивать индивидеально.
#qt#libs
#writing
@ieltsstrategies
🖌📕Make the most of your Writing test:
@ieltsstrategies
• analyse each task properly and spend some time making notes
• highlight or underline key words in the tasks to make sure that you focus on what you have to do
• plan your answers
• use paragraphs clearly; put one idea in each paragraph
• do not repeat ideas using different words
• do not copy whole sentences from the question – you will receive no marks for this
• keep to the topic; do not write about unrelated subjects
• manage your time; remember, Task 2 is worth twice as much as Task 1
• spend approximately 20 minutes on Task 1 and approximately 40 minutes on Task 2
• you must write your answers in full; answers written in note form or in bullet points will lose marks
@ieltsstrategies
• pay attention to spelling, grammar and punctuation; you will lose marks for mistakes
• avoid informal language
• do not memorise model answers; examiners are trained to recognise them and your test will be invalid
• spend several minutes re-reading and correcting your answers
@ieltsstrategies
#writing
✅ Writing time
🔰 Task 1 (Pie charts 🧇 )
✌️ 2-qism
🧇 Pie charts yozish uchun bu ajoyib qo'llanma o'z ichiga turli foydali mashq va so'zlarni olgan bo'lib foydali bo'ladi degan umiddaman.
♻️@cambridgeIELTSbooks
#writing
✅ Writing time
🔰 Task 1
☺️Sizlarga qanday qilib Task 1 savolini Paraphrase qilishni va shu asosida introduction yozishni o'rgataman. Agar foydali deb hisoblasangiz,ulashing.
♻️@cambridgeIELTSbooks
#writing
✅ Writing time
🔰 Task 1 (Line graph 📉📈)
✌️2-qism
📈 Line graph yozish uchun bu ajoyib qo'llanma o'z ichiga turli foydali mashq va so'zlardan iborat bo'lib foydali bo'ladi degan umiddaman.
♻️@cambridgeIELTSbooks
#writing
Qani endi mana bu task 1 uchun tayyorlagan kichik qo’llanmani ilingchi. Ha evaziga izohlarda “ rahmat “ deb yozib qoldirish “tekin” aytib qo’yay😁. Oldingi postda qoldiribsizlarku, shundan ilhomlanib “tishimni kavagida” saqlayotganlarimni ham ulashyapman aytib qo’yay🤪.
👍@cambridgeieltsbooks
Ayrimlar hatto like bosish pullik deb o’ylaydimi deymanda “reaction”lar kamligini ko’rib ba’zan.
✅Writing time
This book is written by a certified professional IELTS instructor who scored Band 9.0 in Academic IELTS.
It provides useful tips and academic word lists for IELTS writing Task 1.
Sharing is caring🔥✊
#writing
✅Channel: @cambridgeIELTSbooks
✅Writing time
▶️TYPES OF IELTS WRITING TASK-2 QUESTIONS
1️⃣Discuss both views and give your opinion?
2️⃣Do you think the advantages outweigh disadvantages?
3️⃣What are the advantages and disadvantages?
4️⃣Is it a positive or a negative development?
5️⃣What are the problems/reasons/causes for this? What would you suggest as a solution?
6️⃣What are the reasons/causes? And how it affects? /what are the effects? /consequences?
7️⃣What are the reasons for this change? Is it a positive or a negative development?
8️⃣To what extent do you agree or disagree?
9️⃣How far do you agree or disagree?
1️⃣0️⃣Do you agree or disagree?
❗️Please note that serial numbers 8, 9 & 10 have the same essay structure
#writing
♻️Sharing is caring🤓
✅Channel: @cambridgeIELTSbooks
✅IELTS WRITING
▶️In this mini-book you will know types of writing task 1 and academic vocabulary to use.
#writing
🤓Kanalga qo'shiling 👇
⭐️@cambridgeIELTSbooks
YouTube|Instagram|Telegram
3 本写作书籍
https://x.com/lennysan/status/1918418517063512088
Lenny Rachitsky 最近推荐了对他写作帮助最大的 3 本书籍,On Writing Well、Nobody wants to read your sh*t、Several short sentences about writing。
这种可以直接 Deep Research 过一遍,感兴趣的可以选择性阅读,前面我们也分享了很多写作合集,参考、精进。
相关链接
关于如何写作丨主题分享
#writing