Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pysamples/brain.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-10-30 17:24:11 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-10-30 17:24:11 (GMT)
commit955cbca83a84b0c1ea06f8c33dfec8dd0f850ed1 (patch)
treeb35c003c4250652885887bfa8e554ce84b2b8696 /pysamples/brain.py
parent32444889db2d7573426b3e93722a566b36385bc3 (diff)
comvert custom blocks to new prim style -- args is passed as a tuple
Diffstat (limited to 'pysamples/brain.py')
-rw-r--r--pysamples/brain.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pysamples/brain.py b/pysamples/brain.py
index 33ee320..3510e03 100644
--- a/pysamples/brain.py
+++ b/pysamples/brain.py
@@ -21,7 +21,7 @@
# <http://www.gnu.org/licenses/>.
-def myblock(tw, text):
+def myblock(tw, args):
''' Dialog with AIML library: Usage: Load this code into a Python
Block. Pass text as an argument and the robot's response will
be pushed to the stack. Use a Pop Block to pop the response
@@ -104,6 +104,7 @@ Close other activities and try once more.'))
return kernel
+ text = args[0]
if not hasattr(tw, 'aiml_kernel'):
tw.aiml_kernel = brain_load(tw, get_default_voice())
response_text = brain_respond(tw.aiml_kernel, text)