def get_extension(tmpfilepath):
    """
    Get the extension of a temporary file created using tempfile.mkstemp
    """
    fileparts = tmpfilepath.split(".")
    if fileparts.__len__() < 2:
        return ""
    ext = fileparts[1][0:3]
    return ext