Package rivescript :: Module python
[hide private]
[frames] | no frames]

Module python

source code

Python object macro support for RiveScript.

This class provides built-in support for your RiveScript documents to include
and execute object macros written in Python. For example:

    > object base64 python
        import base64 as b64
        return b64.b64encode(" ".join(args))
    < object

    + encode * in base64
    - OK: <call>base64 <star></call>

Python support is on by default. To turn it off, just unset the Python language
handler on your RiveScript object:

    rs.set_handler("python", None)

Classes [hide private]
  PyRiveObjects
A RiveScript object handler for Python code.
Variables [hide private]
  __package__ = None