[EMAIL PROTECTED] wrote]
> 
>     Trent> Nah, the Try Ruby thing is mostly faking it (I believe) rather
>     Trent> than running an actually Ruby interactive session ("bastion'ed"
>     Trent> or not).
> 
> I don't think so.  I tried typing some stuff at the prompt that it wasn't
> asking for, like "x = [1,2,3]" followed by "x * 5" when it was asking me to
> type "2 + 6".  It evaluated both properly as far as I could tell.  

Yah. My guess at what he is doing (and the way I'd probably do this for
Python) is to compile each statement, only allow certain constructs
(like assigning to a variable, defining literals, basic operator usage,
maybe some control flow statements -- although I didn't get that far)
and then execute those.

> OTOH, it
> hung when I entered "def fib(n)".  Never got to the next prompt.  

Punted on continued/multi-line statements maybe?

> Looking at
> the Javascript, it appears to be some sort of Ajaxian thing...

Yup.


Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to