def generate_file_name(filename):
    """
    @brief      generate file name
    @return     new file name
    """
    i = filename.rfind('.')
    ext = filename[i:]
    tmp = filename + str(int(time.time()))
    hash_md5 = hashlib.md5(tmp)
    return hash_md5.hexdigest() + ext

    @brief      generate file name
    @return     new file name
    
wxbot_project_py2.7/wechat/utils.py