Can Python work like Java Applet?

Jim Dabell jim-usenet at jimdabell.com
Wed Oct 22 11:16:45 EDT 2003


Batista, Facundo wrote:

> #- I am in the process to choose which to learn. Java or
> #- Python? I was told that
> #- Python is much more neat. But I am not sure about its
> #- functionality. Can it
> #- support something like Java Applet? If so, I will learn this one.
> 
> AFIK, no. But, remember that 'Java' and 'Java Applet' are different
> things. And 'Java' doesn't support something like 'Java Applet'.

Excuse me?  A Java applet is built with Java.  Perhaps you are thinking of
Javascript?


> Just don't get confused by the names. Browsers have embedded a 'Java
> Applet' interpreter. You can't execute Java there.

Of course you can, that's the whole point!

Anyway, to answer the original question, browsers don't have a built-in
Python runtime, but that doesn't really matter as you can use JPython to
construct a Java applet from Python sources.

Take a look here for more information:

<URL:http://www.jython.org/applets/>

Remember that this has the same drawbacks as with Java applets - not all
user-agents (browsers) support them, and it's often a better idea to do
things on the server.


-- 
Jim Dabell





More information about the Python-list mailing list