TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #173 · 28 окт.

Для тех кто пишет расширения на 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

Hashtags

Резултати

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

Пребарај: #eubeachcleanupcampaign

当前筛选 #eubeachcleanupcampaign清除筛选
EU in Kazakhstan 🇪🇺🇰🇿

@euinkazakhstan · Post #958 · 21.09.2024 г., 13:23

21 September2024 ASTANA – As part of World Cleanup Day and the #EUBeachCleanup environmental campaign, the Delegation of the European Union to Kazakhstan, in collaboration with the Estonian Embassy in Kazakhstan and with the support of the Akimat of Astana and the environmental movement “We are for a clean country” organized a cleanup event along the banks of the Karasu River in Astana on September 21, 2024. In her address to participants, the Head of the EU Delegation to Kazakhstan, Ms. Aleska Simkic, remarked: “Today's #EUBeachCleanup campaign is more than just picking up litter. It is about taking responsibility for our planet. Each and everyone of us can contribute, by decreasing his/her carbon footprint – at least not litter, by making those close to him/her aware of the importance of individual action and by influencing the politicians of our countries to enforce policies for cleaner environment. Together, we can tackle waste pollution and inspire lasting change. When communities unite, we can build a cleaner, greener future for Kazakhstan and the world.” Ambassador of Estonia to Kazakhstan, Mr. Jaap Ora, extended his gratitude to the Akimat of the City of Astana, local environmental activists, the EU Delegation to Kazakhstan, and all participants of the World Cleanup Day in Kazakhstan. “This shows our joint commitment to preserving the environment. This year is particularly significant, as World Cleanup Day, which originated in Estonia, has been officially added to the UN Calendar of International Days starting from 2024. This recognition will undoubtedly enhance its visibility and impact.” The event brought together around 300 participants, including diplomats and staff from embassies representing countries of Europe, America, Asia, and Africa, as well as representatives from international organizations and the Youth Public Association of the Earth Foundation, local residents and visitors to the Capital alsojoined in, cleaning the banks of the Karasu River of litter and waste. World Cleanup Day and the #EUBeachCleanup campaign were also supported by all regions and cities of Kazakhstan, making it part of the large-scale environmental campaign “Taza Qazaqstan”. This made the campaign part of a nationwide effort to raise awareness about cleanliness and promote the development of ecological culture. On this day, winners of the Instagram Reels contest – which encouraged participants to showcase their eco-friendly habits – were awarded with special prizes. In addition, thanks to the efforts of the participants, a large number of plastic bottles were collected and sent for recycling. To conclude the event, participants took part in a flash mob, forming a large heart to symbolize their love for Planet Earth. As part of this significant environmental initiative, a teleconference was organized between the UN Office in New York and Astana. During a live broadcast, Ms. Heidi Solba, President and Head of the global network Let’s Do It World and World Cleanup Day, discussed the importance of this action and highlighted Kazakhstan’s role in the global environmental movement. The European Union Delegation and the Estonian Embassy in Kazakhstan extend their deepest gratitude to all partners and participants of World Cleanup Day and the #EUBeachCleanupcampaign! Background information: World Cleanup Day is one of the largest global movements that unites millions of volunteers, governments and organisations. With 19,068,786 participants from a new high of 198 countries and territories – which includes a new high of 90% of UN member states – WCD marked a return to pre-Covid engagement levels, with the movement’s second-highest annual turnout. From 2024, World Cleanup Day is declared an official UN Day, on 20 September annually, and has now been added to their Calendar of International Days and Weeks. This world-changing idea began in Estonia, in 2008. #EUBeachCleanup is a more focussed global campaign organised by the EU and the UN to raise awareness about plastic pollution all over the world.