rspet_server_api.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:RSPET 作者: panagiks 项目源码 文件源码
def general_help():
    """Return general help."""
    hlp_sntx = RSPET_API.help()
    #Read 'state' argument from query string.
    cur_state = request.args.get('state')
    #Remove excluded functions.
    for hlp in EXCLUDED_FUNCTIONS:
        if hlp in hlp_sntx:
            hlp_sntx.pop(hlp)
    #Remove out of scope functions.
    tmp = {}
    for hlp in hlp_sntx:
        if cur_state in hlp_sntx[hlp]['states']:
            tmp[hlp] = hlp_sntx[hlp]
    return jsonify({'commands': [make_public_help(command, hlp_sntx[command])\
                    for command in tmp]})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号