I remember that the first time I read about Python as a programming
language was when reading the W3C's HTML 4.01 specification a few years
ago. In the section on objects, images and applets
(http://www.w3.org/TR/html401/struct/objects.html) an example was given
like
<P><OBJECT classid="http://www.miamachina.it/analogclock.py">
<PARAM name="height" value="40" valuetype="data">
<PARAM name="width" value="40" valuetype="data">
This user agent cannot render Python applications.
</OBJECT>
It's also in the XHTML2.0 specification. Now, is this just a theoretical
example? Or is there a browser that _does_ support python scripts? Or do
we have to place our bets on the Mozilla 1.9 milestone with hard work
being done by Mark Hammond?
I'm asking because of all the AJAX hype going on. I'd like rather not
delve too deep into JavaScript and use Python instead.
Any insights to be shared?
Cheers,
Roger
Take a look at this kit:
It seems that this is a python programmer that has created JavaScript
functions that "feel" a lot like Python. May just be a transitional
way to go, but I thought it was interesting anyway.
-Larry Bates
Take a look at this kit:
I've not used it, but am interested in hearing from anyone who has.
http://www.aminus.org/blogs/index.php/phunt/2005/10/06/subway_s_new_ajax_framework
http://www.aminus.org/blogs/index.php/phunt/2005/10/09/psst_crackajax_is_in_svn
>
> I'm asking because of all the AJAX hype going on. I'd like rather not
> delve too deep into JavaScript and use Python instead.
>
> Any insights to be shared?
>
> Cheers,
> Roger
In addition to the others already mentioned, you might want to check out
Nevow. Quoting from the website:
"Finally, Nevow includes LivePage, a two-way bridge between Javascript
in a browser and Python on the server. LivePage is compatible with
Mozilla, Firefox, Windows Internet Explorer 6, and Safari on Mac OS X.
Event handlers can be written in pure Python and Javascript
implementation details are hidden from the programmer, with Nevow taking
care of routing data to and from the server using XmlHttpRequest."
http://divmod.org/trac/wiki/DivmodNevow
Steve P.
Internet Explorer will allow any registered ActiveScript language to be
used in a web page. Python qualifies. In the latest Win32 extensions,
there is a script in win32comext/axscript/client/pyscript.py that will
register Python as an ActiveScript language.
The you can say
<script language="python">
print "<h1>Hello, there.</h1>"
</script>
--
- Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
Out of curiosity, how "sandboxed" is this Python? I remember a similar
solution being withdrawn once because it wasn't really safely sandboxed,
so the ``script'' could easily do any arbitrary damage to the machine...
Alex
Good point. Can python be used to write firefox extensions that could
be called from javascript?
1) javascript would come in on the HTML page
2) javascript would communication with the Extension API
3) the extension would be written in python
That way, you would only need to make your extension's API safe to the wild.
It would require the user to download an extension, but flash, et all
seem to do ok.
Is this possible today?
Thanks
Mike
PS. Sorry for my ignorance on this, I am a client-side developer,
trying to explore serious client development.
--
The greatest performance improvement occurs on the transition of from
the non-working state to the working state.
I remember this as well. I thought the holes were largely plugged, but I
admit to losing track of the discussion. Is Mark Hammond in the viewing
audience?
One of the compromises is that the pywin32 installer does not perform this
registration automatically. The script is present, but you have to run the
registration script yourself.