Python and Java Compared?

Alex Martelli aleaxit at yahoo.com
Tue Apr 3 15:20:43 EDT 2001


"Dry Ice" <nomail at nomail.com> wrote in message
news:3aca143c_2 at news4.newsfeeds.com...
> [...]
>
> Observations greatly appreciated.
>
> > If you need/want to run in browsers, use jython to generate Java
> > bytecodes from your Python source and pack it up in a jar.
> >
>
> How about applet production?  Possible with Jython?

Piece of cake -- see http://www.jython.org/applets/index.html.

Alas, there _is_ a 200K library to be downloaded -- which may
make it impractical if you're targeting users with moderately
slow modem connections and/or short attention spans -- but,
in exchange, a 'hello world' applet source is as small as:

from java.applet import Applet

class HelloWorld(Applet):
    def paint(self, g):
        g.drawString("Hello from Jython!" 20, 30)



Alex






More information about the Python-list mailing list