def login(username, password, users, env=None): """Login user: check password, prepare environment and start 'shell'. env is additional dict to update() environment dict """ user = auth(username, password, users) if user: env = inituser_env(user, env=env) system(user.shell, env, user.dir) else: raise AuthError
def _shsession(self, jobs, last): """Execute only jobs of one sequence on one gimp instance (one session), last is the opt of last sequence (last item in self._bs!) """ if len(jobs) != 0: if not last: jobs = jobs.copy() # FIXME but final console message is not close, so until console is close # starting of next gimp is impossible, may be workaround with another # system() without waiting child PID jobs.append(u"'(gimp-quit 0)'") jobs.set_opt("-i") j = Gimpsh._prebatch(jobs, self.vars) # returns real list (not Session) of -b OPTs else: j = "" #jobs.set_opt("-s") # no splash window cl = u"%s %s %s" % (self.gimp, j, jobs.cmdline) utils.system(cl)