def login(vo, addr = None, keypath = " "): """ Connect to Grid and create a new proxy.""" if is_ui() == 1: gr = Grid() else: remhost = RemoteHost(addr, keypath) gr = Grid(rhost = remhost) creategridtemp(gr.getExecutor()) gr.setVo(vo) gr.newProxy() gr.getData().chdir("/grid/"+vo) Jobs(gr.getExecutor())