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

Резултати

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

Пребарај: #criminel

当前筛选 #criminel清除筛选
American Оbserver

@american_observer · Post #5532 · 01.04.2026 г., 14:59

🔤🔤🔤🔤2️⃣ The Spanish prime minister, Pedro Sánchez, wrote on X: “It is an asymmetric measure that would not apply to Israelis who committed the same crimes. Same crime, different punishment. That is not justice. It is a step closer to apartheid.” Germany, traditionally one of Israel’s closest allies in Europe, said it could not endorse the law. “The German government views the law passed yesterday with great concern,” the government spokesperson Stefan Kornelius said in a statement. “The rejection of the death penalty is a fundamental principle of German policy,” Kornelius said, adding: “Such a law would likely apply exclusively to Palestinians in the Palestinian territories.” The legislation makes the death penalty the default punishment for Palestinians in the Israeli-occupied West Bank found guilty of intentionally carrying out deadly attacks deemed acts of terrorism by a military court. According to the bill, those sentenced to death would be held in a separate facility with no visits except from authorised personnel, and legal consultations conducted only by video link. Executions would be carried out within 90 days of sentencing. Israel has rarely used the death penalty, applying it only in exceptional cases. The Nazi war criminal Adolf Eichmann was the last person to be executed, in 1962. The national security minister, Itamar Ben-Gvir, one of the bill’s strongest backers, has repeatedly worn a noose-shaped lapel pin, symbolising executions under the proposal. A security committee made some amendments to the bill, which last week passed its first vote. Israel’s public broadcaster, Kan, reported that executions would be carried out by hanging. The measure would allow courts to impose the death penalty without a request from prosecutors and without requiring unanimity, instead permitting a simple majority decision. Military courts in the occupied West Bank would also be empowered to hand down death sentences, with the defence minister able to submit an opinion. Adam Coogle, the deputy Middle East director of Human Rights Watch, said: “Israeli officials argue that imposing the death penalty is about security, but in reality it entrenches discrimination and a two-tiered system of justice, both hallmarks of apartheid. “The death penalty is irreversible and cruel. Combined with its severe restrictions on appeals and its 90-day execution timeline, this bill aims to kill Palestinian detainees faster and with less scrutiny.” Shaista Aziz, Oxfam’s campaign engagement lead, said: “This bill is another horrifying act of violence. Israel is violating international law. This new law effectively ensures that the death penalty in Israel will apply only to Palestinians, even as the illegal Israeli occupation has lately seen a surge in the coordinated attacks and executions of Palestinians by settler militias and military. “Israel holds more than 9,000 Palestinians in its jails – many unlawfully and subject to inhumane conditions, starvation and torture as state policy.” In Israel, the law is already facing legal challenges. Several Israeli human rights groups and three members of parliament filed petitions to the supreme court seeking to overturn it. The Association for Civil Rights in Israel said the law created “two parallel tracks, both designed to apply to Palestinians” and should be struck down on constitutional grounds. #israel#palestinians#court#criminel#war 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #5531 · 01.04.2026 г., 13:59

Israel: The Dangerous Turn To Death Penalty 🔤🔤🔤🔤1️⃣ A new Israeli law that would allow the execution of Palestinians convicted on terror charges for deadly attacks, but not Jewish extremists accused of similar crimes, would constitute a war crime if enacted, according to one of the UN’s most senior human rights officials. Speaking amid mounting international condemnation of the bill, the UN’s high commissioner for human rights, Volker Türk, described the law as “patently inconsistent with Israel’s international law obligations, including in relation to the right to life”. He added that it “raises serious concerns about due process violations, is deeply discriminatory, and must be promptly repealed”. “Its application in a discriminatory manner would constitute an additional, particularly egregious violation of international law. Its application to residents of the occupied Palestinian territory would constitute a war crime,” Türk said. The legislation, passed on Monday by the Israeli Knesset, has faced a wave of criticism, including from European leaders and human rights groups. “The death penalty bill in Israel is very concerning to us in the EU,” the EU spokesperson Anouar El Anouni said in Brussels. “This is a clear step backwards – the introduction of the death penalty, together with the discriminatory nature of the law.” #israel#palestinians#court#criminel#war 📱American Оbserver - Stay up to date on all important events 🇺🇸