Для тех кто пишет расширения на 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
Free online Russian language courses in South Africa and Lesotho 🇷🇺🇿🇦
The Russian Embassy in the Republic of South Africa, together with Tomsk State University (TSU) - the oldest university in Siberia - is pleased to announce the launch of free online Russian language courses taught by experienced university professors.
🎓 The courses are primarily aimed at international students planning to apply to Russian universities, offering pre-arrival language training and support for adaptation to academic life in Russia. Participants with other learning goals are also welcome.
📅 Course details:
* Start: 16 February 2026
* Duration: until 30 August 2026
* Format: online
* Schedule: morning & evening sessions (twice a week, 1.5 hours)
* Levels: from beginner to advanced
📝 Registration deadline: 10 February 2026
Groups will be formed based on applications.
👉 Apply now and take your first step toward mastering Russian and preparing for future studies in Russia!
🔗 Registration link: https://forms.gle/bb4rvLdo6s6xxWjR9
#studyinrussia#russianlanguage#russianliterature
✍️On this day, 9 September 1828, Leo #Tolstoy was born — one of the greatest Russian writers and philosophers, whose ideas on morality, justice and non-violence profoundly shaped humanitarian thought. His legacy inspired thinkers and political leaders across the globe and continues to speak to readers worldwide.
📚 Tolstoy created works that became timeless classics of world literature: War and Peace, Anna Karenina, the Sevastopol Sketches and the autobiographical trilogy Childhood. Boyhood. Youth. His books have been translated into more than 90 languages and remain accessible to millions of readers across the globe.
📖Read Tolstoy online in English:
• War and Peace
• Anna Karenina
• Sevastopol Sketches
🎥Watch War and Peace (dir. Sergei Bondarchuk)
The epic adaptation of Tolstoy’s masterpiece, directed by Sergei Bondarchuk, became the first Soviet film to win an Academy Award (Best Foreign Language Film, 1969):
• ▶Part I: Andrei Bolkonsky
• ▶Part II: Natasha Rostova
• ▶Part III: The Year 1812
• ▶Part IV: Pierre Bezukhov
🌍Tolstoy Today
📌 In 2024, Russia established the Leo Tolstoy Peace Prize, awarded for outstanding contributions to peacebuilding, the defense of human rights and efforts to prevent the threat of world war or nuclear catastrophe. The first laureate, in September 2024, was the African Union.
📌 Tolstoy’s family estate, Yasnaya Polyana, remains not only a memorial museum but also an international cultural centre. It hosts the annual Tolstoy Weekend literary festival, concerts, exhibitions, children’s programmes, and international cultural projects.
Find the full calendar of events here: Yasnaya Polyana Museum — Events & Exhibitions
✨ Tolstoy’s legacy continues to unite cultures and generations. As he wrote in War and Peace:
“The two most powerful warriors are patience and time.”
#Tolstoy#RussianLiterature#YasnayaPolyana
🇪🇹➡️🇷🇺 FROM ETHIOPIAN PRINCE TO RUSSIAN GENIUS: THE INCREDIBLE STORY OF PUSHKIN'S HERITAGE! | የአፍሪካ ልጅ ወደ ሩስያ ገፀ ባህሪ
Did you know that Russia's greatest poet had Ethiopian roots? A story that will change your perspective on Russian literature! 🤯
🏰 HANNIBAL - LEGEND OF THE ERA:
• Prince from Logone (territory of modern Ethiopia)
• Kidnapped by slave traders → sold in Constantinople
• Bought by Russian ambassador → gifted to Peter I at age 8
• Studied military engineering in France
• First Black general of Russian army
• Owner of Suyda estate near St. Petersburg (now a museum!)
• Spoke 11 languages, built fortresses from Baltic to Caspian Sea
📚 PUSHKIN - AFRICAN HERITAGE:
• Proud of his roots: *"My grandfather lived in Africa, where free Negro still blows sacred horns"*
• First multicultural Russian poet
• African motifs in "Anchar" - poisonous tree of tropics
• In "Queen of Spades" - image of Negro servant (autobiographical?)
• Redefined concept of "Russianness" through diversity
• Fought racism through creativity
🎭 POETRY - POET'S SOUL:
LINES ABOUT ROOTS:
*"My grandfather lived in Africa,*
*Where free Negro still*
*Blows into sacred horns..."*
አያቴ በአፍሪካ ነበር፣
ያልተገዛ ሰው አሁንም
በተቀደሰ መለከት ይነፋል...
FROM "ANCHAR" (African motifs):
*"In desert barren and austere,*
*On soil scorched by heat,*
*Anchar, like terrible guard,*
*Stands alone in universe..."*
በደረቅ እና ቆንጆ በረሃ ውስጥ፣
በሙቀት የተቃጠለ መሬት ላይ፣
እንደ አስፈሪ ጠባቂ አንቻር
በመላው አለም ውስጥ ብቸኛ ቆሟል...
🔥 AMAZING FACTS:
• Pushkin - great-grandson of Ethiopian prince!
• Hannibal befriended Voltaire and Diderot
• Pushkin family - entire dynasty of Russian nobles
• Suyda Museum preserves Hannibal's African artifacts
✨ Expert-reviewed content | Verified by Russian literature & Ethiopian history specialists
#Pushkin#EthiopianRoots#RussianLiterature#AfricanDiaspora#ኢትዮጵያ#Hannibal🇪🇹🇷🇺📚
29 January — Birthday of Anton Pavlovich Chekhov
Today marks the birthday of Anton Pavlovich Chekhov, an outstanding Russian writer and playwright and one of the most influential figures in world literature.
Chekhov’s work had a profound impact on the development of modern theatre and prose in the 20th century. His plays remain in the repertoire of leading theatres worldwide, while his short stories, translated into dozens of languages, continue to resonate with readers through their psychological depth, subtle understanding of human nature, and exceptional artistic mastery.
Chekhov’s legacy represents an essential part of Russia’s cultural heritage and the global literary tradition.
#AntonChekhov#Chekhov#RussianLiterature#WorldLiterature#Classics#CulturalHeritage