Sign in

Google Wave APIs (Labs)

WaveProtocol.org

Learn about the Google Wave Federation Protocol and get involved

Sample Details

Monty

By: Google Wave APIs Team - Jun 25, 2009

Evaluates Python expressions.

 BEST PRACTICE
Demonstrates using the Python SDK to process root blips/child blips, and create blips.

Robot Address: i-cron@appspot.com

APIs: Robots

Languages: Python

Tags: code

*Live demos require Wave Sandbox access to view

Comments (4)

Title

Comments

Your name

 

Please make sure your comments are useful and informative.

Mismatch?  

The robot accessible at i-cron@appspot.com doesn't seem to match this source code. Has it been updated to a newer version perhaps? Placing raw python expressions in blips works fine, and returns the evaluation. Blips that's can't be evaluated as python just get empty blip replies, and I can't seem to make a program execute in the root blip.

list comprehensions work  

[i for i in range(100) if i%2] will cause i-cron (Monty is a better name, but I can't alias it as that) to output all the odd numbers up to 100. Other than that I still haven't figured out how to get it to work. To address the earlier concern about getting it to do a sample calculation, try this: [i for i in range(100) if i == 4+5] :-P

Example would be nice  

I can't get this robot to output anything. A sample calculation would be great. Looking at the source code it looks like the Python expression must be encased in CALC(), but I can't get any output.

Python Execution Syntax  

What is a sample syntax for how you would have monty execute python code?