Jython is just right for you (was Re: Guide me)

Alex Martelli aleaxit at yahoo.com
Wed Apr 11 05:07:42 EDT 2001


"atul" <atul at dsfinternet.com> wrote in message
news:2vo0b9.8k.ln at dsfintranet.dsf...
> hi
> I am a java programmer and i want to know that how python can be usefulll
to
> me.
> Please help me. I have heard a lot about python . How can i get started
and
> whether it can be learnt easily by me

Python can be *EXTREMELY* useful to you, particularly its
implementation called Jython, which works right on your
favourite Java Virtual Machine (assuming your JVM complies
with Java 1.1, 1.2, or 1.3) and interoperates seamlessly
with all the classes from the Java libraries you know and
love.  And you'll have little trouble learning it!

The key fact that will make Python (Jython, particularly)
very useful to you is mentioned in this snippet quoted
from Bruce Eckel's "Thinking in Patterns" book (see later
in this message for how & where to download it):
"""
To me, Python and Java present a very potent combination
for program development because of Java’s architecture
and tool set, and Python’s extremely rapid development
(generally considered to be 5-10 times faster than C++
or Java
"""

Just imagine -- programming 5 or 10 times faster than
you do now, without losing ANYTHING of the class libraries
and tools you already know... interested?  Read on!


I would suggest that you start by learning "just Python"
by visiting www.python.org, downloading the appropriate
distribution for your favourite platform, installing it,
and working through the Tutorial that is included in the
online docs.  There are good alternative/supplementary
introductions, too -- you'll find them listed under
http://www.python.org/doc/Intros.html (I'm partial to
Magnus Lie Hetland's "Instant Python", now located at
http://www.hetland.org/python/instant-python.php, but
that's partly an issue of personal taste!).  What you
learn this way will also be applicable to Jython, which
is really the same language as Python -- just remember
that *the library classes available to Jython are ALL
those available to Java* (plus a good subset of the
standard Python library, but not all of it).


Armed with the modicum of Python knowledge thus gained,
then go to www.jython.org.  Check out that your JVM is
OK with Jython (see www.jython.org/platform.htm), then
download the Jython installer [a single URL...:]
http://prdownloads.sourceforge.net/jython/jython-20.class
and install it as per the instructions you'll find at
http://www.jython.org/install.html.

Then go to http://www.jython.org/docs/index.html for a
list of available Jython docs -- they're all useful,
one way or another.  You'll learn how to call any Java
class from Jython, how to use Jython to extend Java
classes and/or implement Java interfaces (e.g. so you
can use Jython to build applets, etc etc), how to use
Jython to build perfectly-normal .class and .jar files
that interoperate seamlessly with any Java code, etc.


Not yet linked from that page, but nevertheless quite
interesting, ftp://www.mindview.net/pub/eckel/TIPatterns/
has the current version of Bruce Eckel's "Thinking in
Patterns" book (you do, I hope, know about Bruce, since
his "Thinking in Java" is arguably THE best book about
Java...).  Chapter 9 is about Jython and why you SHOULD
be very interested in it, and for what.  Actually, you
could do worse than ignore all of my advice above, start
with Bruce's book (chapter 9 in particular), and follow
up by installing Jython and trying out Bruce's examples;
apart from everything else, you WILL thus get a very
nice [if still very preliminary] introduction to design
patterns, a subject almost as important as Python:-).


Alex






More information about the Python-list mailing list