l.a.Attachments(object) : class documentation

Part of lpltk.attachments View In Hierarchy

No class docstring
Method __init__ Undocumented
Method __len__ Undocumented
Method __getitem__ Undocumented
Method __iter__ Undocumented
Method __contains__ Undocumented
Method download_in_dir Undocumented
Method extract_archives Undocumented
Method try_gzip Undocumented
Method force_mimetype Undocumented
Method add_filter Add filter f to constrain the list of attachments.
Method check_required_files Check that collection includes required filenames
Method __fetch_if_needed Undocumented
Method __gzip_if_needed Undocumented
Method __find_mime_type Undocumented
Method __get_tar_members Undocumented
Method __exceeds_tar_limit Undocumented
Method __get_zip_members Undocumented
Method __exceeds_zip_limit Undocumented
def __init__(self, tkbug):
Undocumented
def __len__(self):
Undocumented
def __getitem__(self, key):
Undocumented
def __iter__(self):
Undocumented
def __contains__(self, item):
Undocumented
def __fetch_if_needed(self):
Undocumented
def __gzip_if_needed(self, attachment):
Undocumented
def __find_mime_type(self, attachment):
Undocumented
def __get_tar_members(self, tarattachment):
Undocumented
def __exceeds_tar_limit(self, fd):
Undocumented
def __get_zip_members(self, zipattachment):
Undocumented
def __exceeds_zip_limit(self, fd):
Undocumented
def download_in_dir(self, download_dir):
Undocumented
def extract_archives(self, extract_dir, extract_limit=None):
Undocumented
def try_gzip(self, gzip_dir):
Undocumented
def force_mimetype(self):
Undocumented
def add_filter(self, f, params):
Add filter f to constrain the list of attachments.

f is a function which takes as arguments an Attachment object, and a list of parameters specific to the given filter.

def check_required_files(self, glob_patterns):
Check that collection includes required filenames

Given a list of glob filename patterns, looks through the attachments to verify at least one attachment fulfils the required file pattern. Returns a list of globs that were not matched. Returns an empty list if all requirements were met.

API Documentation for lpltk, generated by pydoctor at 2012-05-21 15:24:05.