Beispiel #1
0
 def read_file(self, file_path):
     items = []
     path = os.path.realpath(file_path)
     if os.path.isfile(path):
         item = check_path(path)
         if item:
             items.append(item)
     self.set_archivos(items)
 def read_file(self, file_path):
     items = []
     path = os.path.realpath(file_path)
     if os.path.isfile(path):
         item = check_path(path)
         if item:
             items.append(item)
     self.set_archivos(items)
        """
        Cuando se ejecuta pasandole un archivo.
        """
        self.archivos = pistas


target = [('Mover', gtk.TARGET_SAME_APP, 1)]


if __name__ == "__main__":
    items = []
    if len(sys.argv) > 1:
        for campo in sys.argv[1:]:
            path = os.path.realpath(campo)
            if os.path.isfile(path):
                item = check_path(path)
                if item:
                    items.append(item)
            elif os.path.isdir(path):
                for arch in os.listdir(path):
                    newpath = os.path.join(path, arch)
                    if os.path.isfile(newpath):
                        item = check_path(newpath)
                        if item:
                            items.append(item)
        if items:
            jamediatube = JAMediaTube()
            jamediatube.set_archivos(items)
        else:
            jamediatube = JAMediaTube()
    else:
Beispiel #4
0
        """
        Cuando se ejecuta pasandole archivos como parámetros.
        """
        self.archivos = pistas


target = [('Mover', gtk.TARGET_SAME_APP, 1)]


if __name__ == "__main__":
    items = []
    if len(sys.argv) > 1:
        for campo in sys.argv[1:]:
            path = os.path.realpath(campo)
            if os.path.isfile(path):
                item = check_path(path)
                if item:
                    items.append(item)
            elif os.path.isdir(path):
                for arch in os.listdir(path):
                    newpath = os.path.join(path, arch)
                    if os.path.isfile(newpath):
                        item = check_path(newpath)
                        if item:
                            items.append(item)
        if items:
            jamediatube = JAMediaTube()
            jamediatube.set_archivos(items)
        else:
            jamediatube = JAMediaTube()
    else: