Beispiel #1
0
    def install(self, pkg_list):
        """ 
        [es] 
        -------------------------------------------------------------------
        [en] 
        """
        if not get_sudo():
            return False

        cmd = [
            "/usr/bin/sudo", "/usr/sbin/synaptic", "--hide-main-window",
            "--non-interactive"
        ]

        cmd.append("--set-selections")
        cmd.append("--progress-str")
        cmd.append(_("Installing packages"))
        cmd.append("--finish-str")
        cmd.append(_("Installed packages"))
        proc = subprocess.Popen(cmd, stdin=subprocess.PIPE)
        print proc
        f = proc.stdin

        try:
            for pkg in pkg_list:
                f.write("%s\tinstall\n" % pkg)
            f.close()
        except:
            return False

        proc.wait()
        return True
Beispiel #2
0
    def install(self, pkg_list):
        """ 
        [es] Instala todos los paquetes en pkg_list. Devuelve VERDADERO si
             la instalación no encuentra ningun error y FALSO en caso
             contrario.
        -------------------------------------------------------------------
        [en] Install all packages in pkg_list.
             Returns True if success. False otherwise.
        """
        if not get_sudo():
            return False

        cmd = [
            "/usr/bin/sudo", "/usr/sbin/synaptic", "--hide-main-window",
            "--non-interactive"
        ]

        cmd.append("--set-selections")
        cmd.append("--progress-str")
        cmd.append(_("Installing packages"))
        cmd.append("--finish-str")
        cmd.append(_("Installed packages"))
        proc = subprocess.Popen(cmd, stdin=subprocess.PIPE)
        print proc
        f = proc.stdin

        for pkg in pkg_list:
            f.write("%s\tinstall\n" % pkg)
        f.close()
        proc.wait()
        return True
    def install(self, pkg_list):
        """
        [es] Instala todos los paquetes en pkg_list. Devuelve VERDADERO si 
             la instalación no encuentra ningun error y FALSO en caso 
             contrario.                                                                                                                    
        -------------------------------------------------------------------
        [en] Install all packages in pkg_list.
             Returns True if success. False otherwise.                                                                                     
        """

        if not get_sudo():
            return False

        cmd = ["/usr/bin/sudo", "/usr/sbin/synaptic", "--hide-main-window", "--non-interactive"]

        cmd.append("--set-selections")
        cmd.append("--progress-str")
        cmd.append(_("Installing packages"))
        cmd.append("--finish-str")
        cmd.append(_("Installed packages"))
        proc = subprocess.Popen(cmd, stdin=subprocess.PIPE)
        print proc
        f = proc.stdin

        try:
            for pkg in pkg_list:
                f.write("%s\tinstall\n" % pkg)
            f.close()
        except:
            return False

        proc.wait()
        return True
    def install(self, pkg_list):
        """ 
        [es] 
        -------------------------------------------------------------------
        [en] 
        """
        if not get_sudo():
            return False

        cmd = ["/usr/bin/sudo", "/usr/sbin/synaptic", "--hide-main-window",  "--non-interactive"]

        cmd.append("--set-selections")
        cmd.append("--progress-str")
        cmd.append(_("Installing packages"))
        cmd.append("--finish-str")
        cmd.append(_("Installed packages"))
        proc = subprocess.Popen(cmd, stdin = subprocess.PIPE)
        print proc
        f = proc.stdin

        try:
            for pkg in pkg_list:
                f.write("%s\tinstall\n" % pkg)
            f.close()
        except:
            return False

        proc.wait()
        return True
    def install(self, pkg_list):
        if not get_sudo():
            return False

        cmd = ["/usr/bin/sudo", "/usr/sbin/synaptic", "--hide-main-window",  "--non-interactive"]

        cmd.append("--set-selections")
        cmd.append("--progress-str")
        cmd.append("Instalando paquetes")
        cmd.append("--finish-str")
        cmd.append("Paquetes instalados")
        proc = subprocess.Popen(cmd, stdin = subprocess.PIPE)
        print proc
        f = proc.stdin

        for pkg in pkg_list:
            f.write("%s\tinstall\n" % pkg)
        f.close()
        proc.wait()
        return True
Beispiel #6
0
    def install(self, pkg_list):
        if not get_sudo():
            return False

        cmd = [
            "/usr/bin/sudo", "/usr/sbin/synaptic", "--hide-main-window",
            "--non-interactive"
        ]

        cmd.append("--set-selections")
        cmd.append("--progress-str")
        cmd.append("Instalando paquetes")
        cmd.append("--finish-str")
        cmd.append("Paquetes instalados")
        proc = subprocess.Popen(cmd, stdin=subprocess.PIPE)
        print proc
        f = proc.stdin

        for pkg in pkg_list:
            f.write("%s\tinstall\n" % pkg)
        f.close()
        proc.wait()
        return True