def language(fname, is_ext=False):
global _langmapping<EOL>if is_ext:<EOL><INDENT>fname = '<STR_LIT:.>' + fname<EOL><DEDENT>_, ext = os.path.splitext(fname)<EOL>return _langmapping[ext]()<EOL>
Return an instance of the language class that fname is suited for.

    Searches through the module langs for the class that matches up
    with fname.  If is_ext is True then fname will be taken to be
    the extension for a language.