本文整理匯總了Python中PyQt5.sip.__name__方法的典型用法代碼示例。如果您正苦於以下問題:Python sip.__name__方法的具體用法?Python sip.__name__怎麽用?Python sip.__name__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PyQt5.sip
的用法示例。
在下文中一共展示了sip.__name__方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _setup
# 需要導入模塊: from PyQt5 import sip [as 別名]
# 或者: from PyQt5.sip import __name__ [as 別名]
def _setup(module, extras):
"""Install common submodules"""
Qt.__binding__ = module.__name__
for name in list(_common_members) + extras:
try:
submodule = _import_sub_module(
module, name)
except ImportError:
try:
# For extra modules like sip and shiboken that may not be
# children of the binding.
submodule = __import__(name)
except ImportError:
continue
setattr(Qt, "_" + name, submodule)
if name not in extras:
# Store reference to original binding,
# but don't store speciality modules
# such as uic or QtUiTools
setattr(Qt, name, _new_module(name))
示例2: _new_module
# 需要導入模塊: from PyQt5 import sip [as 別名]
# 或者: from PyQt5.sip import __name__ [as 別名]
def _new_module(name):
return types.ModuleType(__name__ + "." + name)
示例3: _import_sub_module
# 需要導入模塊: from PyQt5 import sip [as 別名]
# 或者: from PyQt5.sip import __name__ [as 別名]
def _import_sub_module(module, name):
"""import_sub_module will mimic the function of importlib.import_module"""
module = __import__(module.__name__ + "." + name)
for level in name.split("."):
module = getattr(module, level)
return module
示例4: __repr__
# 需要導入模塊: from PyQt5 import sip [as 別名]
# 或者: from PyQt5.sip import __name__ [as 別名]
def __repr__(self):
return "<{}: {}>".format(self.__class__.__name__, self.__name)