Peragro-AT
 All Classes Namespaces Functions Pages
Functions | Variables
damn_at.mimetypes Namespace Reference

Functions

def guess_type
 

Variables

list search_paths = [path for path in sys.path[:] if path.find('damn_at') == -1]
 
tuple sys_mimetypes = imp.load_module('mimetypes', file_handle, pathname, desc)
 
 guess_extension = sys_mimetypes.guess_extension
 

Detailed Description

Role
====

Replacement for system's mimetype, adding some new types
and cleaning up reverse map for cleaner file extensions.

Function Documentation

def damn_at.mimetypes.guess_type (   url,
  strict = True 
)
Try to guess the mimetype for the given file using the
standard python mimetypes module.
If this fails fallback to libmagic.