当前位置: 首页>>代码示例>>Python>>正文


Python QSslSocket.sslLibraryVersionString方法代码示例

本文整理汇总了Python中PyQt5.QtNetwork.QSslSocket.sslLibraryVersionString方法的典型用法代码示例。如果您正苦于以下问题:Python QSslSocket.sslLibraryVersionString方法的具体用法?Python QSslSocket.sslLibraryVersionString怎么用?Python QSslSocket.sslLibraryVersionString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.QtNetwork.QSslSocket的用法示例。


在下文中一共展示了QSslSocket.sslLibraryVersionString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: version

# 需要导入模块: from PyQt5.QtNetwork import QSslSocket [as 别名]
# 或者: from PyQt5.QtNetwork.QSslSocket import sslLibraryVersionString [as 别名]
def version():
    """Return a string with various version informations."""
    lines = ["qutebrowser v{}".format(qutebrowser.__version__)]
    gitver = _git_str()
    if gitver is not None:
        lines.append("Git commit: {}".format(gitver))
    lines += [
        '',
        '{}: {}'.format(platform.python_implementation(),
                        platform.python_version()),
        'Qt: {}, runtime: {}'.format(QT_VERSION_STR, qVersion()),
        'PyQt: {}'.format(PYQT_VERSION_STR),
    ]
    lines += _module_versions()

    if QSslSocket is not None and QSslSocket.supportsSsl():
        ssl_version = QSslSocket.sslLibraryVersionString()
    else:
        ssl_version = 'unavailable'
    lines += [
        'Webkit: {}'.format(qWebKitVersion()),
        'Harfbuzz: {}'.format(os.environ.get('QT_HARFBUZZ', 'system')),
        'SSL: {}'.format(ssl_version),
        '',
        'Frozen: {}'.format(hasattr(sys, 'frozen')),
        'Platform: {}, {}'.format(platform.platform(),
                                  platform.architecture()[0]),
    ]
    lines += _os_info()
    return '\n'.join(lines)
开发者ID:tharugrim,项目名称:qutebrowser,代码行数:32,代码来源:version.py

示例2: version

# 需要导入模块: from PyQt5.QtNetwork import QSslSocket [as 别名]
# 或者: from PyQt5.QtNetwork.QSslSocket import sslLibraryVersionString [as 别名]
def version():
    """Return a string with various version informations."""
    lines = ["qutebrowser v{}".format(qutebrowser.__version__)]
    gitver = _git_str()
    if gitver is not None:
        lines.append("Git commit: {}".format(gitver))

    if qVersion() != QT_VERSION_STR:
        qt_version = 'Qt: {} (compiled {})'.format(qVersion(), QT_VERSION_STR)
    else:
        qt_version = 'Qt: {}'.format(qVersion())

    lines += [
        '',
        '{}: {}'.format(platform.python_implementation(),
                        platform.python_version()),
        qt_version,
        'PyQt: {}'.format(PYQT_VERSION_STR),
        '',
    ]

    lines += _module_versions()

    lines += ['pdf.js: {}'.format(_pdfjs_version())]

    if qWebKitVersion is None:
        lines.append('Webkit: no')
    else:
        lines.append('Webkit: {}'.format(qWebKitVersion()))

    lines += [
        'SSL: {}'.format(QSslSocket.sslLibraryVersionString()),
        '',
    ]

    qapp = QApplication.instance()
    if qapp:
        style = qapp.style()
        lines.append('Style: {}'.format(style.metaObject().className()))

    importpath = os.path.dirname(os.path.abspath(qutebrowser.__file__))

    lines += [
        'Platform: {}, {}'.format(platform.platform(),
                                  platform.architecture()[0]),
        'Frozen: {}'.format(hasattr(sys, 'frozen')),
        "Imported from {}".format(importpath),
    ]
    lines += _os_info()

    lines += [
        '',
        'Paths:',
    ]
    for name, path in _path_info().items():
        lines += ['{}: {}'.format(name, path)]

    return '\n'.join(lines)
开发者ID:NoctuaNivalis,项目名称:qutebrowser,代码行数:60,代码来源:version.py

示例3: version

# 需要导入模块: from PyQt5.QtNetwork import QSslSocket [as 别名]
# 或者: from PyQt5.QtNetwork.QSslSocket import sslLibraryVersionString [as 别名]
def version():
    """Return a string with various version informations."""
    lines = ["qutebrowser v{}".format(qutebrowser.__version__)]
    gitver = _git_str()
    if gitver is not None:
        lines.append("Git commit: {}".format(gitver))

    if qVersion() != QT_VERSION_STR:
        qt_version = "Qt: {} (compiled {})".format(qVersion(), QT_VERSION_STR)
    else:
        qt_version = "Qt: {}".format(qVersion())

    lines += [
        "",
        "{}: {}".format(platform.python_implementation(), platform.python_version()),
        qt_version,
        "PyQt: {}".format(PYQT_VERSION_STR),
        "",
    ]

    lines += _module_versions()

    lines += ["pdf.js: {}".format(_pdfjs_version())]

    if qWebKitVersion is None:
        lines.append("Webkit: no")
    else:
        lines.append("Webkit: {}".format(qWebKitVersion()))

    lines += ["SSL: {}".format(QSslSocket.sslLibraryVersionString()), ""]

    qapp = QApplication.instance()
    if qapp:
        style = qapp.style()
        lines.append("Style: {}".format(style.metaObject().className()))

    importpath = os.path.dirname(os.path.abspath(qutebrowser.__file__))

    lines += [
        "Platform: {}, {}".format(platform.platform(), platform.architecture()[0]),
        "Frozen: {}".format(hasattr(sys, "frozen")),
        "Imported from {}".format(importpath),
    ]
    lines += _os_info()
    return "\n".join(lines)
开发者ID:lahwaacz,项目名称:qutebrowser,代码行数:47,代码来源:version.py

示例4: version

# 需要导入模块: from PyQt5.QtNetwork import QSslSocket [as 别名]
# 或者: from PyQt5.QtNetwork.QSslSocket import sslLibraryVersionString [as 别名]
def version(short=False):
    """Return a string with various version informations.

    Args:
        short: Return a shortened output.
    """
    lines = ["qutebrowser v{}".format(qutebrowser.__version__)]
    gitver = _git_str()
    if gitver is not None:
        lines.append("Git commit: {}".format(gitver))
    lines += [
        '',
        '{}: {}'.format(platform.python_implementation(),
                        platform.python_version()),
        'Qt: {}, runtime: {}'.format(QT_VERSION_STR, qVersion()),
        'PyQt: {}'.format(PYQT_VERSION_STR),
    ]

    if not short:
        style = QApplication.instance().style()
        lines += [
            'Style: {}'.format(style.metaObject().className()),
            'Desktop: {}'.format(os.environ.get('DESKTOP_SESSION')),
        ]

        lines += _module_versions()

        lines += [
            'pdf.js: {}'.format(_pdfjs_version()),
            'Webkit: {}'.format(qWebKitVersion()),
            'Harfbuzz: {}'.format(os.environ.get('QT_HARFBUZZ', 'system')),
            'SSL: {}'.format(QSslSocket.sslLibraryVersionString()),
            '',
            'Frozen: {}'.format(hasattr(sys, 'frozen')),
            'Platform: {}, {}'.format(platform.platform(),
                                      platform.architecture()[0]),
        ]
        lines += _os_info()
    return '\n'.join(lines)
开发者ID:Konubinix,项目名称:qutebrowser,代码行数:41,代码来源:version.py

示例5: version

# 需要导入模块: from PyQt5.QtNetwork import QSslSocket [as 别名]
# 或者: from PyQt5.QtNetwork.QSslSocket import sslLibraryVersionString [as 别名]
def version():
    """Return a string with various version informations."""
    lines = ["qutebrowser v{}".format(qutebrowser.__version__)]
    gitver = _git_str()
    if gitver is not None:
        lines.append("Git commit: {}".format(gitver))

    lines.append("Backend: {}".format(_backend()))

    lines += [
        '',
        '{}: {}'.format(platform.python_implementation(),
                        platform.python_version()),
        'Qt: {}'.format(earlyinit.qt_version()),
        'PyQt: {}'.format(PYQT_VERSION_STR),
        '',
    ]

    lines += _module_versions()

    lines += [
        'pdf.js: {}'.format(_pdfjs_version()),
        'sqlite: {}'.format(sql.version()),
        'QtNetwork SSL: {}\n'.format(QSslSocket.sslLibraryVersionString()
                                     if QSslSocket.supportsSsl() else 'no'),
    ]

    qapp = QApplication.instance()
    if qapp:
        style = qapp.style()
        lines.append('Style: {}'.format(style.metaObject().className()))

    importpath = os.path.dirname(os.path.abspath(qutebrowser.__file__))

    lines += [
        'Platform: {}, {}'.format(platform.platform(),
                                  platform.architecture()[0]),
    ]
    dist = distribution()
    if dist is not None:
        lines += [
            'Linux distribution: {} ({})'.format(dist.pretty, dist.parsed.name)
        ]

    lines += [
        'Frozen: {}'.format(hasattr(sys, 'frozen')),
        "Imported from {}".format(importpath),
        "Qt library executable path: {}, data path: {}".format(
            QLibraryInfo.location(QLibraryInfo.LibraryExecutablesPath),
            QLibraryInfo.location(QLibraryInfo.DataPath)
        )
    ]

    if not dist or dist.parsed == Distribution.unknown:
        lines += _os_info()

    lines += [
        '',
        'Paths:',
    ]
    for name, path in sorted(_path_info().items()):
        lines += ['{}: {}'.format(name, path)]

    return '\n'.join(lines)
开发者ID:nanjekyejoannah,项目名称:qutebrowser,代码行数:66,代码来源:version.py

示例6: OrderedDict

# 需要导入模块: from PyQt5.QtNetwork import QSslSocket [as 别名]
# 或者: from PyQt5.QtNetwork.QSslSocket import sslLibraryVersionString [as 别名]
)
from PyQt5.QtNetwork import QSslSocket

from picard import PICARD_FANCY_VERSION_STR
from picard.disc import discid_version
from picard.util.astrcmp import astrcmp_implementation

_versions = OrderedDict([
    ("version", PICARD_FANCY_VERSION_STR),
    ("python-version", python_version()),
    ("pyqt-version", pyqt_version),
    ("qt-version", QT_VERSION_STR),
    ("mutagen-version", mutagen_version),
    ("discid-version", discid_version),
    ("astrcmp", astrcmp_implementation),
    ("SSL", QSslSocket.sslLibraryVersionString())
])

_names = {
    "version": "Picard",
    "python-version": "Python",
    "pyqt-version": "PyQt",
    "qt-version": "Qt",
    "mutagen-version": "Mutagen",
    "discid-version": "Discid",
    "astrcmp": "astrcmp",
    "SSL": "SSL",
}


def _value_as_text(value, i18n=False):
开发者ID:mineo,项目名称:picard,代码行数:33,代码来源:versions.py


注:本文中的PyQt5.QtNetwork.QSslSocket.sslLibraryVersionString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。