Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Return a tuple (mime, num_pages, size) with info about the archive
at <path>, or None if <path> doesn't point to a supported archive.

        def get_archive_info(path):
    """Return a tuple (mime, num_pages, size) with info about the archive
    at , or None if  doesn't point to a supported archive.
    """
    image_re = re.compile(r'\.(jpg|jpeg|png|gif|tif|tiff|bmp)\s*$', re.I)
    extractor = Extractor()
    extractor.setup(path, None)
    mime = extractor.get_mime_type()
    if mime is None:
        return None
    files = extractor.get_files()
    extractor.close()
    num_pages = len(filter(image_re.search, files))
    size = os.stat(path).st_size
    return (mime, num_pages, size)
        


src/c/o/Comix-HEAD/src/librarybackend.py   Comix(Download)
        path = os.path.abspath(path)
        name = os.path.basename(path)
        info = archive.get_archive_info(path)
        if info is None:
            return False