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

Резултати

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

Пребарај: #hazard

当前筛选 #hazard清除筛选
Universe Mysteries 🪐

@cosmomyst · Post #316 · 23.09.2025 г., 12:21

🪐 Asteroid (2007) FT3 is a large near-Earth object, measuring about 340 meters across, that periodically comes close enough for astronomers to classify it as potentially hazardous. Its orbit is tracked because, though it poses no immediate danger, even objects this size could cause severe destruction if they ever collided with Earth—showing why scientists keep careful watch on these silent travelers. ✨ #asteroids⚡#hazard⚡#monitoring⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #170 · 22.08.2025 г., 03:11

🪐 The asteroid (33342) 1998 WT24, about half a kilometer wide, regularly makes close approaches to Earth, coming inside the orbit of Mercury every few years due to its highly elongated path. Its size and proximity earn it the label "potentially hazardous asteroid," so NASA keeps a close eye on it to ensure its orbit remains safely predictable. ✨ #asteroids⚡#hazard⚡#monitoring⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #92 · 07.08.2025 г., 00:11

🪐 The asteroid 99942 Apophis may get the most headlines, but there are over 2,300 "potentially hazardous asteroids" tracked by NASA's Sentry system, like (410777) 2009 FD and (144898) 2004 VD17. These objects, each large enough to cause serious regional damage if they ever struck Earth, are monitored for changes in their orbits to ensure they pose no imminent threat. ✨ #asteroids⚡#hazard⚡#monitoring⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #105 · 09.08.2025 г., 13:11

🪐 The asteroid (153814) 2001 WN5, roughly 1 kilometer across, will pass exceptionally close to Earth in 2028—only about 248,000 kilometers away, closer than the Moon. Because of its size and fast approach, 2001 WN5 is classified as a "potentially hazardous asteroid," meaning it could cause regional devastation if it ever struck our planet, so astronomers track its orbit with special care. ✨ #asteroids⚡#nearEarth⚡#hazard⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #91 · 06.08.2025 г., 20:11

🪐 The asteroid (99942) 2004 MN4, known as Apophis’s “cousin,” (163899) 2003 SD220, is a mountain-sized space rock that approaches Earth’s orbit about every December. Measuring roughly 1.6 kilometers long, its close passes remind scientists how even asteroids with well-known orbits can periodically come within just a few million kilometers of our planet, earning it a spot on NASA's list of potentially hazardous objects. ✨ #asteroids⚡#hazard⚡#nearEarth⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #458 · 26.10.2025 г., 12:21

🪐 One of the most closely monitored space objects threatening Earth is the asteroid (29075) 1950 DA, a kilometer-wide rock that will come unusually close to our planet in the year 2880. What makes 1950 DA especially concerning is its "rubble pile" structure, where its surface is held together more by weak forces between its grains than by gravity, making its behavior unpredictable if its path changes—so astronomers continually track it for any shift that could bring it closer to Earth in the future. ✨ #asteroid⚡#hazard⚡#monitoring⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

12
ПретходнаСтраница 1 од 2Следна