Exemplo n.º 1
0
 def test_get_host_info(self):
     attrs = ["pid"]
     if POSIX:
         attrs += ["uid", "pid"]
     for x in attrs:
         self.assertTrue(x in get_host_info(),
                         "%s not found in host info" % x)
Exemplo n.º 2
0
def get_server_info(prefix=""):
    #this function is for non UI thread info
    info = {}
    info.update(get_host_info(prefix))
    info.update(get_platform_info(mk(prefix, "platform")))
    info.update(get_version_info(mk(prefix, "build")))
    return info
Exemplo n.º 3
0
def get_server_info(prefix=""):
    #this function is for non UI thread info
    info = {}
    info.update(get_host_info(prefix))
    info.update(get_platform_info(mk(prefix, "platform")))
    info.update(get_version_info(mk(prefix, "build")))
    return info
Exemplo n.º 4
0
def main():
    def print_dict(d):
        for k in sorted(d.keys()):
            v = d[k]
            print("* %s : %s" % (k.ljust(32), nonl(pver(v))))
    from xpra.platform import init, clean
    try:
        init("Version-Info", "Version Info")
        print("Build:")
        print_dict(get_version_info())
        print("")
        print("Platform:")
        pi = get_platform_info()
        #ugly workaround for the fact that "sys.platform" has no key..
        if "" in pi:
            pi["sys"] = pi[""]
            del pi[""]
        print_dict(pi)
        print("")
        print("Host:")
        d = get_host_info()
        #add os specific version info:
        try:
            from xpra.platform.info import get_version_info as pvinfo
            d.update(pvinfo())
        except:
            pass
        print_dict(d)
    finally:
        clean()
Exemplo n.º 5
0
def main():
    def print_dict(d):
        for k in sorted(d.keys()):
            v = d[k]
            print("* %s : %s" % (k.ljust(32), nonl(pver(v))))
    from xpra.platform import init, clean
    try:
        init("Version-Info", "Version Info")
        print("Build:")
        print_dict(get_version_info())
        print("")
        print("Platform:")
        pi = get_platform_info()
        #ugly workaround for the fact that "sys.platform" has no key..
        if "" in pi:
            pi["sys"] = pi[""]
            del pi[""]
        print_dict(pi)
        print("")
        print("Host:")
        d = get_host_info()
        #add os specific version info:
        try:
            from xpra.platform.info import get_version_info as pvinfo
            d.update(pvinfo())
        except:
            pass
        print_dict(d)
    finally:
        clean()
Exemplo n.º 6
0
def get_server_info():
    #this function is for non UI thread info
    info = {
            "platform"  : get_platform_info(),
            "build"     : get_version_info_full(),
            }
    info.update(get_host_info())
    return info
Exemplo n.º 7
0
def get_server_info():
    #this function is for non UI thread info
    info = {
        "platform": get_platform_info(),
        "build": get_version_info_full(),
    }
    info.update(get_host_info())
    return info
Exemplo n.º 8
0
def get_server_info():
    #this function is for non UI thread info
    info = {}
    info.update(get_host_info())
    def up(prefix, d):
        updict(info, prefix, d)
    up("platform",  get_platform_info())
    up("build",     get_version_info())
    return info
Exemplo n.º 9
0
def get_server_info():
    #this function is for non UI thread info
    info = {}
    info.update(get_host_info())

    def up(prefix, d):
        updict(info, prefix, d)

    up("platform", get_platform_info())
    up("build", get_version_info())
    return info
Exemplo n.º 10
0
 def get_sys_info():
     d = {}
     for k, v in {
             "version": get_version_info(),
             "platform": get_platform_info(),
             "host": get_host_info(),
             "paths": get_path_info(),
             "gtk": get_gtk_version_info(),
             "user": get_user_info(),
             "env": os.environ,
     }.items():
         updict(d, k, v)
     return d
Exemplo n.º 11
0
 def get_sys_info():
     from xpra.platform.info import get_user_info
     from xpra.scripts.config import read_xpra_defaults
     return {
             "argv"          : sys.argv,
             "path"          : sys.path,
             "exec_prefix"   : sys.exec_prefix,
             "executable"    : sys.executable,
             "version"       : get_version_info(),
             "platform"      : get_platform_info(),
             "host"          : get_host_info(),
             "paths"         : get_path_info(),
             "gtk"           : get_gtk_version_info(),
             "gui"           : get_gui_info(),
             "display"       : get_display_info(),
             "user"          : get_user_info(),
             "env"           : os.environ,
             "config"        : read_xpra_defaults(),
             }
Exemplo n.º 12
0
 def get_sys_info():
     from xpra.platform.info import get_user_info
     from xpra.scripts.config import read_xpra_defaults
     return {
         "argv": sys.argv,
         "path": sys.path,
         "exec_prefix": sys.exec_prefix,
         "executable": sys.executable,
         "version": get_version_info(),
         "platform": get_platform_info(),
         "host": get_host_info(),
         "paths": get_path_info(),
         "gtk": get_gtk_version_info(),
         "gui": get_gui_info(),
         "display": get_display_info(),
         "user": get_user_info(),
         "env": os.environ,
         "config": read_xpra_defaults(),
     }
Exemplo n.º 13
0
 def get_sys_info():
     d = {
             "argv"          : sys.argv,
             "path"          : sys.path,
             "exec_prefix"   : sys.exec_prefix,
             "executable"    : sys.executable,
          }
     for k,v in {
             "version"       : get_version_info(),
             "platform"      : get_platform_info(),
             "host"          : get_host_info(),
             "paths"         : get_path_info(),
             "gtk"           : get_gtk_version_info(),
             "gui"           : get_gui_info(),
             "display"       : get_display_info(),
             "user"          : get_user_info(),
             "env"           : os.environ,
             "config"        : read_xpra_defaults(),
             }.items():
         updict(d, k, v)
     return d
Exemplo n.º 14
0
def main():
    from xpra.platform import program_context
    with program_context("Version-Info", "Version Info"):
        print("Build:")
        print_nested_dict(get_version_info())
        print("")
        print("Platform:")
        pi = get_platform_info()
        #ugly workaround for the fact that "sys.platform" has no key..
        if "" in pi:
            pi["sys"] = pi[""]
            del pi[""]
        print_nested_dict(pi)
        print("")
        print("Host:")
        d = get_host_info()
        #add os specific version info:
        from xpra.platform.info import get_version_info as pvinfo
        d.update(pvinfo())
        print_nested_dict(d)
    return 0
Exemplo n.º 15
0
def main():
    from xpra.platform import program_context
    with program_context("Version-Info", "Version Info"):
        print("Build:")
        print_nested_dict(get_version_info())
        print("")
        print("Platform:")
        pi = get_platform_info()
        #ugly workaround for the fact that "sys.platform" has no key..
        if "" in pi:
            pi["sys"] = pi[""]
            del pi[""]
        print_nested_dict(pi)
        print("")
        print("Host:")
        d = get_host_info()
        #add os specific version info:
        try:
            from xpra.platform.info import get_version_info as pvinfo
            d.update(pvinfo())
        except:
            pass
        print_nested_dict(d)
Exemplo n.º 16
0
 def test_get_host_info(self):
     attrs = ["pid"]
     if os.name=="posix":
         attrs += ["uid", "pid"]
     for x in attrs:
         self.assertTrue(x in get_host_info(), "%s not found in host info" % x)
Exemplo n.º 17
0
 def test_get_host_info(self):
     for x in ("pid", "uid", "gid"):
         self.assertTrue(x in get_host_info())
Exemplo n.º 18
0
 def test_get_host_info(self):
     for x in ("pid", "uid", "gid"):
         self.assertTrue(x in get_host_info())