code is data

Bruno Desthuilliers onurb at xiludom.gro
Fri Jun 23 09:50:17 EDT 2006


Anton Vredegoor wrote:
(snip)

> However, I knew of the existence of such languages but I am mostly
> interested in standardized code interchange, like for example with JSONP
> which fetches some external javascriptcode from another server using
> JSON and places the translated javascript into a webpage at the request
> of the clients browser or so it seems.

This is AJAX with JSON instead of XML (should we call this AJAJ ?-).
It's quite handy, since it saves both the extra bits to be transfered
(XML is way much verbose than JSON) and the XML to javascript parsing.

> Maybe a Python webserver could
> also emit pieces of javascript code by getting them from a *Python* code
> library after translating Python code on the fly?

If you restrict this on data, it's already done (Turbogears uses this
for AJAX).

> That would open up the web to Python programmers without browsers
> needing to understand Python. Like Jython, but now as separately
> distributed functions from different servers.
> 
> Anton


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list