def send_file(to, file):
    """
    @brief      send file to user or gourp
    @param      to: String, user id or group id
    @param      file: String, file name
    """
    file_path = os.path.join(app.config['UPLOAD_FOLDER'], file)
    return jsonify({'ret': 0 if wechat.send_file(to, file_path) else 1})

    @brief      send file to user or gourp
    @param      to: String, user id or group id
    @param      file: String, file name
    
wxbot_project_py2.7/weixin_bot.py