Python PyQt5 模块,__name__() 实例源码

我们从Python开源项目中,提取了以下29个代码示例,用于说明如何使用PyQt5.__name__()

项目:saveScreenShot    作者:guncys-inc    | 项目源码 | 文件源码
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            # print("Trying %s" % name)
            submodule = importlib.import_module(
                module.__name__ + "." + name)
        except ImportError:
            # print("Failed %s" % name)
            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))
项目:TACTIC-Handler    作者:listyque    | 项目源码 | 文件源码
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            # print("Trying %s" % name)
            submodule = importlib.import_module(
                module.__name__ + "." + name)
        except ImportError:
            # print("Failed %s" % name)
            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))
项目:zoocore    作者:dsparrow27    | 项目源码 | 文件源码
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            submodule = importlib.import_module(
                module.__name__ + "." + 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))
项目:maya-pulse    作者:bohdon    | 项目源码 | 文件源码
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:
            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))
项目:surume    作者:tm8r    | 项目源码 | 文件源码
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:
            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))
项目:maya-capture-gui    作者:Colorbleed    | 项目源码 | 文件源码
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            # print("Trying %s" % name)
            submodule = importlib.import_module(
                module.__name__ + "." + name)
        except ImportError:
            # print("Failed %s" % name)
            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))
项目:coconodz    作者:rkoschmitzky    | 项目源码 | 文件源码
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            submodule = importlib.import_module(
                module.__name__ + "." + 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))
项目:dm2skin    作者:duncanskertchly    | 项目源码 | 文件源码
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            submodule = importlib.import_module(
                module.__name__ + "." + 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))
项目:P4VFX    作者:TomMinor    | 项目源码 | 文件源码
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            # print("Trying %s" % name)
            submodule = importlib.import_module(
                module.__name__ + "." + name)
        except ImportError:
            # print("Failed %s" % name)
            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))
项目:P4VFX    作者:TomMinor    | 项目源码 | 文件源码
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            # print("Trying %s" % name)
            submodule = importlib.import_module(
                module.__name__ + "." + name)
        except ImportError:
            # print("Failed %s" % name)
            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))
项目:core    作者:getavalon    | 项目源码 | 文件源码
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            submodule = importlib.import_module(
                module.__name__ + "." + 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))
项目:Qt.py    作者:mottosso    | 项目源码 | 文件源码
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:
            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))
项目:auri    作者:Sookhaal    | 项目源码 | 文件源码
def _setup(module, extras):
    """Install common submodules"""

    Qt.__binding__ = module.__name__

    for name in list(_common_members) + extras:
        try:
            submodule = importlib.import_module(
                module.__name__ + "." + 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))
项目:saveScreenShot    作者:guncys-inc    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:TACTIC-Handler    作者:listyque    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:zoocore    作者:dsparrow27    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:maya-pulse    作者:bohdon    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:maya-pulse    作者:bohdon    | 项目源码 | 文件源码
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
项目:surume    作者:tm8r    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:surume    作者:tm8r    | 项目源码 | 文件源码
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
项目:maya-capture-gui    作者:Colorbleed    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:coconodz    作者:rkoschmitzky    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:dm2skin    作者:duncanskertchly    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:P4VFX    作者:TomMinor    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:P4VFX    作者:TomMinor    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:core    作者:getavalon    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:Qt.py    作者:mottosso    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)
项目:Qt.py    作者:mottosso    | 项目源码 | 文件源码
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
项目:auri    作者:Sookhaal    | 项目源码 | 文件源码
def _new_module(name):
    return types.ModuleType(__name__ + "." + name)