You can look at a site called UtilityMill (http://utilitymill.com/) that hosts user-defined Python code, and wraps it in an API to be used interactively through an HTML form, or programmatically over HTTP. I'm pretty sure that the author makes the source code available for this site.
Also, you could look at a particular utility on UtilityMill, the Trading Strategy Evaluator (http://utilitymill.com/utility/trading_strategy_evaluator). This accepts a Python function in an HTML form text input field, and then runs that function as part of a trading simulation. (Since this a utility hosted within UtilityMill, the source code is publicly viewable.) -- Paul _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor