Пример #1
0
if __name__ == "__main__":
    grid = llstart.get_config("grid")

    if grid == None:
        grid = "aditi"

    build_config = llstart.get_config("build_config")
    my_args = llstart.get_config("viewer_args", force_dict=True)
    opts, args = getopt.getopt(sys.argv[1:], "u:r:f:g:i:h", ["region=", "username="******"farm=", "grid=", "ip=", "help"])
    region = None
    for o, a in opts:
        if o in ("-r", "--region", "-u", "--username"):
            region = a
        if o in ("-f", "--farm", "-g", "--grid"):
            grid = a
        if o in ("-h", "--help"):
            usage()
            sys.exit(0)

    slurl = llstart.get_config("slurl")
    if slurl == None:
        if region is None:
            region = llstart.get_user_name()
        slurl = "//%s/128/128/" % (region)
    # Ensure the slurl has quotes around it.
    if slurl is not None:
        slurl = '"%s"' % (slurl.strip("\"'"))

    start_client(grid, slurl, build_config, my_args)
Пример #2
0
if __name__ == "__main__":
    grid = llstart.get_config("grid")
    
    if grid == None:
        grid = "aditi"
        
    build_config = llstart.get_config("build_config")
    my_args = llstart.get_config("viewer_args", force_dict = True)
    opts, args = getopt.getopt(sys.argv[1:], "u:r:f:g:i:h",
        ["region=", "username="******"farm=", "grid=", "ip=", "help"])
    region = None
    for o, a in opts:
        if o in ("-r", "--region", "-u", "--username"):
            region = a
        if o in ("-f", "--farm", "-g", "--grid"):
            grid = a
        if o in ("-h", "--help"):
            usage()
            sys.exit(0)
            
    slurl = llstart.get_config("slurl")            
    if slurl == None:
        if region is None:
            region = llstart.get_user_name()
        slurl = "//%s/128/128/" % (region)
    # Ensure the slurl has quotes around it.
    if slurl is not None:
        slurl = '"%s"' % (slurl.strip('"\''))
    
    start_client(grid, slurl, build_config, my_args)