[PYTHON] 生成python doc

本文详细介绍了 Robot Framework 中的内置库 BuiltIn,该库提供了多种常用的关键词,包括验证、转换和其他各种用途,如日志记录、暂停、条件执行等。文章还探讨了 HTML 错误消息、表达式评估、布尔参数、多行字符串比较等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

python -m robot.libdoc LIBS/COM_MSG/msg_command.py LIBS/COM_MSG/msg_command.html

python -m robot.libdoc LIBS/COM_MSG/msg_command.py LIBS/COM_MSG/msg_command.html

An sample for python document:

class BuiltIn(_Verify, _Converter, _Variables, _RunKeyword, _Control, _Misc):
    """An always available standard library with often needed keywords.

    ``BuiltIn`` is Robot Framework's standard library that provides a set
    of generic keywords needed often. It is imported automatically and
    thus always available. The provided keywords can be used, for example,
    for verifications (e.g. `Should Be Equal`, `Should Contain`),
    conversions (e.g. `Convert To Integer`) and for various other purposes
    (e.g. `Log`, `Sleep`, `Run Keyword If`, `Set Global Variable`).

    == Table of contents ==

    - `HTML error messages`
    - `Evaluating expressions`
    - `Boolean arguments`
    - `Multiline string comparisons`
    - `Shortcuts`
    - `Keywords`

    = HTML error messages =

    Many of the keywords accept an optional error message to use if the keyword
    fails. Starting from Robot Framework 2.8, it is possible to use HTML in
    these messages by prefixing them with ``*HTML*``. See `Fail` keyword for
    a usage example. Notice that using HTML in messages is not limited to
    BuiltIn library but works with any error message.

    = Evaluating expressions =

    Many keywords, such as `Evaluate`, `Run Keyword If` and `Should Be True`,
    accept an expression that is evaluated in Python. These expressions are
    evaluated using Python's
    [https://docs.python.org/2/library/functions.html#eval|eval] function so
    that all Python built-ins like ``len()`` and ``int()`` are available.
    `Evaluate` allows configuring the execution namespace with custom modules,
    and other keywords have [https://docs.python.org/2/library/os.html|os]
    and [https://docs.python.org/2/library/sys.html|sys] modules available
    automatically.

134555_bkch_2767751.png

转载于:https://my.oschina.net/activehealth/blog/735130

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值