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

Резултати

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

Пребарај: #habitability

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

@cosmomyst · Post #81 · 04.08.2025 г., 20:11

🪐 The exoplanet Kepler-438b, orbiting a red dwarf star about 470 light-years from Earth, is one of the most Earth-like worlds found in terms of size and temperature. Scientists have carefully measured its position in the “habitable zone”—the region around a star where liquid water might exist, a key ingredient scientists believe is necessary for life as we know it. ✨ #aliens⚡#exoplanets⚡#habitability⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #421 · 14.10.2025 г., 12:21

🪐 Astronomers have pinpointed the exoplanet LP 890-9 c, located about 105 light-years away in the constellation Eridanus, as one of the most promising places for life outside our solar system. This rocky world orbits within its star’s habitable zone—the region where temperatures could allow liquid water to persist, making it a key target in the search for planets that might support life as we know it. ✨ #exoplanets⚡#habitability⚡#astrobiology⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #509 · 20.11.2025 г., 12:21

🪐 Astronomers have discovered that the exoplanet Gliese 486 b, about 26 light-years away in the constellation Virgo, is a rocky world with surface temperatures hot enough to melt lead. Even though it's likely too warm for life as we know it, its firm, Earth-like surface and relatively close distance make it an important candidate for studying rocky planets outside our solar system—and for searching how and where life might survive under extreme conditions. ✨ #exoplanets⚡#life⚡#habitability⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #140 · 16.08.2025 г., 03:11

🪐 Around the distant red dwarf star LHS 1140, about 49 light-years from Earth, astronomers have discovered a rocky exoplanet called LHS 1140 b that sits right in the star’s “habitable zone”—the area where temperatures could allow liquid water to exist. Recent observations suggest its atmosphere may still be intact, making LHS 1140 b one of the most promising known worlds for the search for life beyond our solar system. ✨ #exoplanets⚡#habitability⚡#discovery⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #171 · 22.08.2025 г., 13:11

🪐 Beyond our solar system, two intriguing exoplanets orbit the star Kepler-62: Kepler-62e and Kepler-62f. Both are considered "super-Earths" (planets larger than Earth but smaller than Neptune) and sit inside their star’s habitable zone, a region where temperatures might allow water to exist as a liquid—a key ingredient for life as we know it. ✨ #exoplanets⚡#habitability⚡#water⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #129 · 14.08.2025 г., 00:11

🪐 Orbiting the cool red dwarf star Ross 128, about 11 light-years away, the exoplanet Ross 128 b is roughly Earth-sized and lies in its star’s temperate zone, where conditions might allow liquid water. Although Ross 128 is much dimmer than the Sun, its calm nature means less intense flares, making Ross 128 b an especially intriguing place in our search for potentially habitable worlds beyond our solar system. ✨ #exoplanets⚡#habitability⚡#water⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #224 · 05.09.2025 г., 00:11

🪐 Astronomers have identified Kepler-442b, an exoplanet about 1,200 light-years away in the constellation Lyra, as a strong candidate for hosting life. This rocky world orbits in its star’s habitable zone—a region where temperatures could allow liquid water—and is just slightly larger than Earth, making it an intriguing example of a real planet with conditions that might one day support living organisms. ✨ #exoplanets⚡#habitability⚡#Kepler442b⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #159 · 20.08.2025 г., 00:11

🪐 Scientists have identified the exoplanet Gliese 581d, orbiting a red dwarf star about 20 light-years away, as one of the earliest potentially habitable worlds outside our solar system. Gliese 581d lies within its star's habitable zone, where temperatures might allow liquid water to exist, making it a key target in the search for life beyond Earth. ✨ #exoplanet⚡#habitability⚡#water⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #65 · 02.08.2025 г., 13:12

🪐 Just 39 light-years away, the exoplanet TRAPPIST-1e circles its cool red dwarf star in the habitable zone, where temperatures might allow liquid water. Scientists have found that TRAPPIST-1e has a rocky surface and, unlike some of its neighbors, could have the right conditions for life as we know it. ✨ #exoplanet⚡#habitability⚡#TRAPPIST1e⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #83 · 05.08.2025 г., 03:11

🪐 Saturn’s moon Titan is one of the most intriguing places in the solar system where life could exist because it has lakes and rivers of liquid methane and ethane—chemicals similar to gasoline on Earth. While it’s far too cold for liquid water, scientists are captivated by the idea that life, if it ever formed there, would be fundamentally different from anything on our planet. ✨ #Titan⚡#methane⚡#habitability⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #744 · 17.04.2026 г., 22:21

🪐 Astronomers have found signs that Uranus’s moon Miranda may hide a subsurface ocean of liquid water beneath its fractured, icy crust. The unique patterns of ridges and canyons on Miranda, revealed by Voyager 2, suggest internal heat could provide the conditions needed for liquid water—a key ingredient for life—even on this tiny, distant world. ✨ #Miranda⚡#oceanworlds⚡#habitability⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​