コード例 #1
0
def is_X11():
    if PYTHON2:
        return True
    if OSX or WIN32:
        return False
    from xpra.x11.gtk3.gdk_bindings import is_X11_Display   #@UnresolvedImport
    x11 = is_X11_Display()
    return x11
コード例 #2
0
def is_X11() -> bool:
    if OSX or WIN32:
        return False
    try:
        from xpra.x11.gtk3.gdk_bindings import is_X11_Display  #@UnresolvedImport
        return is_X11_Display()
    except ImportError:
        get_util_logger().debug("failed to load x11 bindings", exc_info=True)
        return True