Для тех кто пишет расширения на 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
🏛️💰HOUSE VOTES DOWN BALANCED BUDGET AMENDMENT DESPITE CRISIS
🔹 House rejects H.J. Res. 2 constitutional amendment to limit federal spending 📋
🔹 Amendment would prohibit total federal outlays exceeding revenues annually ⚖️
🔹 Current federal deficit hits two trillion dollars with rising debt costs 💸
🔹 Proponents argued amendment enforces fiscal discipline amid spending crisis 🚨
🔹 Opponents called it misguided and inflexible for national emergencies 🌍
🔹 Rep Comer notes twenty-seven states already applied for Article V convention 📊
Fiscal responsibility debate continues as national debt spirals higher 📈🔥
#USNews#budget
President Donald Trump wants Congress to pass a $1.5 trillion defense budget alongside dramatic cuts to domestic projects — a pitch he will have a tough time selling inside his own party. 💰⚔️
After teasing an ambitious increase to military spending for months, the president made it official Friday by releasing a budget blueprint that would boost the Pentagon by more than 40 percent in the fiscal year beginning in October. 📊
Yet among the congressional Republicans who will need to pass the funding, many are concerned about supersizing defense spending ahead of the coming midterm elections, especially as voters begin to feel the economic consequences of the Iran war and Democrats look to campaign on that issue. ⚠️
“I’m very wary of voting for excessive spending in defense,” Rep. Tim Burchett (R-Tenn.) said in an interview Friday morning.
The president’s budget asks Republicans to pass a large chunk of his defense proposal — some $350 billion — using the party-line reconciliation process to skirt the Senate filibuster and forgo bipartisan negotiations. 🏛
Congressional GOP leaders have already started to embrace the concept of sidelining Democrats to boost Pentagon dollars and immigration enforcement accounts that are currently unfunded amid the broader Department of Homeland Security shutdown.
#Trump#budget
👂More on Trump's Ear
⚠️
Six days of war with Iran cost the US more than $11 billion 💵
The first six days of the war against Iran cost the US more than $11.3 billion, according to the New York Times. The Pentagon reported this to congressmen at a closed briefing. 🏛
However, this figure does not include many of the costs associated with preparing for the attacks on Iran, and the actual costs may be significantly higher. 📈
In the first two days of the war, the military used ammunition worth $5.6 billion, as previously reported by American media outlets. 💥
The CSIS think tank estimated the costs of the first 100 hours at $3.7 billion. 💰
According to the Iran War Cost Tracker, the total costs as of the morning of March 12 were over $17 billion. 📊
According to this data, the U.S. is spending about $1 billion per day. 💸
Subsequent long-term costs, such as the provision of veterans, are not taken into account. ⚠️
#War#budget
👂More on Trump's Ear ⚠️
Таким образом нейросети анализируют актуальный бюджет:
Рост расходов уже идёт не в инвестиции, а в текущее потребление (оборона, безопасность, выплаты).
Сокращаются или стагнируют статьи, дающие мультипликатор роста:
инфраструктура, НИОКР, высокотехнологичное производство, МСП.
Инновации замедлятся.
Экономика станет более зависимой от бюджета, а не от частного сектора.
Любое падение доходов (нефть, налоги) увеличит госдолг.
Госаппарат будет разрастаться.
Ручное управление станет нормой (как пример, запрет на экспорт бензина и дизеля, налоговые каникулы для особых компаний)
Частный капитал будет утекать или переходить в низкорисковые ниши.
В социальной сфере качество услуг будет формальным.
Эффект:
Краткосрочно — социальное напряжение сдерживается.
Долгосрочно:
Деградация населения
Расслоение общества
Невнятная национальная идея
При сохранении текущей бюджетной структуры, экономической модели и внешних ограничений уровень жизни в России на горизонте 5 лет (≈ 2030–2031), скорее всего, будет выглядеть так:
Доходы населения снизятся.
Средний реальный доход:
➜ –10…–20 % к уровню 2019–2021
(даже если номинально зарплаты растут, инфляция и налоги съедают рост).
⚖️ Расслоение усилится
Лучше всех будут себя чувствовать:
бюджетники «приоритетных» сфер,
силовой сектор,
крупные госкорпорации.
Хуже всех:
частный сектор,
регионы без бюджетных вливаний,
малый бизнес.
➡️ «Средний класс» продолжит сжиматься.
#budget#russia
Trump decided not to be petty and urged increase the Pentagon budget by 1.5 times at once.
The increase in defense spending by 500 billion dollars, of course, offers to pay for trade duties. Last year, they brought in $200 billion to the budget, and in Trump's imagination - $ 10 trillion.
#Trump#Pentagon#budget
👂More on Trump's Ear
The US government has partially suspended work due to a budget dispute 🇺🇸💰
In the United States, the work of federal authorities has partially stopped due to the fact that Congress could not agree on an interim budget ⏳. At the same time, the previous budget expired at midnight local time 🕛.
The Senate's last-minute attempt to make a decision on funding failed: the document was supported by only 55 senators out of the required 60 ❌. The key dispute was over healthcare costs ⚕️. The Democrats demanded the return of the reduced funding for the Medicaid program for the poor, but President Donald Trump has made cuts in this area one of his policy priorities.
As a result, it was not possible to reach an agreement 🤝❌. The shutdown, as the government shutdown is called, means large-scale disruptions in the work of government agencies: air transportation will be affected ✈️, and some national parks and museums will be closed 🏞🏛. The only exceptions are vital services such as police 👮♂️, air traffic controllers 🛫, and emergency medicine 🚑.
The last time the federal administration stopped was in 2018-2019, also under Trump. Then the shutdown lasted a record five weeks and became the longest in the history of the United States 📜.
#shutdown#budget
👂More on Trump's Ear ⚠️
🔆Iqtisodiy faktlar...
📊Foiz stavkasi nima?
📊Foiz stavkasi - kredit muassasalari, masalan, banklar qarzga pul berganlik uchun undiriladigan summa yoki aksincha, omonatchilarning mablag‘laridan foydalanganlik uchun to‘laydigan summa.
🔍Batafsil
🏦 Что такое Процентная ставка?
📊 Процентная ставка — сумма, которую кредитные учреждения, такие как банки, взимают за предоставление денег в долг или, наоборот, сумма, которую они платят вкладчикам за использование их средств.
🔍Подробнее
#GraduateSchool#Budget#Business#Economy
🔝Web-site |🔝Facebook | 🔝Instagram | 🔝Youtube
💠Venchurlarni moliyalashtirish forumida venchur investitsiyalar ekotizimini rivojlantirishning ustuvor yo‘nalishlari muhokama qilindi
🔘Mazkur Forumda venchur investitsiyalar sohasidagi davlat vazirlik va idoralari, tijorat banklari, yirik sanoat birlashmalari, innovatsion infratuzilma tashkilotlari, oliy ta’lim muassasalari va tadbirkorlik subyektlari vakillari ishtirok etdilar.
💠Key directions for the development of the venture investment ecosystem were discussed at The Venture Financing Forum
🔘The event brought together representatives from ministries, government agencies, commercial banks, major business associations, higher education institutions, organizations supporting startup projects, and entrepreneurs.
💠На Форуме венчурного финансирования обсуждены ключевые направления развития экосистемы венчурных инвестиций
🔘В Форуме приняли участие представители министерств, ведомств, коммерческих банков, крупных хозяйственных объединений, высших учебных заведений, организаций, поддерживающих стартап-проекты, а также предприниматели.
#GraduateSchool#Budget#Business#Economy
🔝Web-site |🔝Facebook | 🔝Instagram | 🔝Youtube
🔆Iqtisodiy faktlar...
📊Byudjet taqchilligi nima?
📊Byudjet taqchilligi ko‘plab mamlakatlar duch keladigan asosiy makroiqtisodiy muammolardan biridir. Byudjet taqchilligi rejalashtirilgan byudjet bilan ijro etilgan byudjetning nomutanosibligi natijasida sodir bo‘ladi va xarajatlarning daromadlardan yuqori bo‘lganligini ko‘rsatadi.
🔍Batafsil
🏦 Что такое Бюджетный дефицит?
💠 Бюджетный дефицит – одна из ключевыхмакроэкономических проблем, с которой сталкиваются многие государства. Этот термин обозначает ситуацию, когда государственные расходы превышают доходы за определенный период, что приводит к недостатку средств для финансирования всех предусмотренных обязательств.
🔎Подробнее
#GraduateSchool#Budget#Business#Economy
🔝Web-site |🔝Facebook | 🔝Instagram | 🔝Youtube