def guess_mimetype_and_encoding(afile):
return _mimes.guess_type(afile)<EOL>
Tries to guess mimetype and encoding of a file.

@param afile: the path/name of a file
@time afile: string
@return: the mimetype and encoding
@rtype: tuple