Jython Essentials
Publisher: O'Reilly Media
Released: March 2002
Pages: 302

Jython is an implementation of the Python programming language written in 100% pure Java, so it runs under any compliant Java Virtual Machine. The secret to Jython's popularity lies in the combination of Java's libraries and tools with Python's rapid development capabilities. With Jython, you can write Python programs that integrate seamlessly with any Java code. And like Python, Jython can be used interactively, so you can get immediate results as you are programming.

Jython Essentials provides a solid introduction to the Python language, offering a brief but thorough tour of the Python concepts you'll need to understand to use Jython effectively. The book makes frequent comparisons between Python and Java, with special emphasis on the different object-oriented semantics of the two languages, so Java programmers can quickly get up to speed with Jython.

Jython Essentials also covers the various ways in which Jython and Java can interact. For example, Jython code can create instances of pre-existing Java classes and call methods in those instances. You can write Jython classes that are direct subclasses of existing Java classes and use introspection to discern the capabilities of JavaBeans components. This book provides examples of using Jython with existing Java libraries, including the Swing GUI toolkit, the JDBC database API, the Servlet API, and various XML tools. And finally, the book shows how Jython can be used as a scripting language within a Java program.

With Jython Essentials, you have everything you need to start creating applications that mix the best of Python's interactivity and Java's robust libraries.

Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyJython Essentials
 
3.6

(based on 5 reviews)

Ratings Distribution

  • 5 Stars

     

    (1)

  • 4 Stars

     

    (2)

  • 3 Stars

     

    (1)

  • 2 Stars

     

    (1)

  • 1 Stars

     

    (0)

Reviewed by 5 customers

Sort by

Displaying reviews 1-5

Back to top

(1 of 2 customers found this review helpful)

 
4.0

great book but needs second edition!

By rabbits77

from Boston, MA

About Me Developer, Sys Admin

Pros

  • Accurate
  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written

Cons

    Best Uses

    • Expert
    • Intermediate
    • Novice
    • Student

    Comments about oreilly Jython Essentials:

    This is a great concise guide to jython and I have frequently used it as a core python language reference also. That said, 8 years is a long time and I would definitely encourage O'Reilly to put together a second edition!

    (0 of 4 customers found this review helpful)

     
    3.0

    A little confusion by Anonymous Reader

    By Anonymous

    from Undisclosed

    Comments about oreilly Jython Essentials:

    A correct code would be:

    import Y

    y = Y.Y()

    not

    Import Y

    y = Y()

    (0 of 2 customers found this review helpful)

     
    2.0

    More examples please

    By Anonymous

    from Undisclosed

    Comments about oreilly Jython Essentials:

    I thought overall it was well laid out and covered most of the points, but thought it would have been far better if there had been more examples included, and any gotchas.

    For example:

    Putting the following into Y.py

    class Y:

    def __init__(self):

    print "foo"

    then in the console doing:

    import Y

    y = Y()

    gives the following error:

    Traceback (innermost last):

    File "", line 1, in ?

    TypeError: call of non-function (module 'Y')

    but it works ok if you type the class definition into the console.

    This sort of problem could have been gone into in the book - there are other examples.

    The book assumes that one knows exactly how to do things in python, and that everything will work just fine 1st time

    (2 of 2 customers found this review helpful)

     
    5.0

    Jython Essentials Review

    By Orlin Melstrand

    from Undisclosed

    Comments about oreilly Jython Essentials:

    This book is similar to the other O'Reilly books that have become popular for their conciseness and content--no fluff here. This is the type of book most useful to someone who wants or needs to concentrate on the subject and learn the technology. (It is not a classroom textbook, with exercises, tests, and so forth, though it does have short examples, which are better for learning than long ones, in my opinion.) The book will probably be most accessible to readers who are familiar with core Java. Familiarity with Python would be helpful, but should not be necessary--a three-chapter introduction to Python is included. It should be of interest to Java and Python programmers, and others interested in scripting applications.

    Appendices are included on Jython installation, and comparisons between Jython and Python and between Jython and Java. A nice little surprise is a section on the use of PyUnit, the Python counterpart to JUnit, for unit testing, which also includes a discussion on compiling Jython.

    The authors explain how to use Java from Jython, including type conversions, and how to subclass Java classes from Jython code. One chapter is devoted to a discussion of Java reflection and working with JavaBeans, and the use of Python reflection. Another includes examples illustrating how to construct an HTML browser and an HTML source browser, using Swing.

    Another chapter includes a short discussion on each of JDBC (actually zxJDBC, the Python version), servlets, and parsing XML, with illustrative examples. The parsing examples use SAX, DOM, and JDOM, respectively; the zxJDBC example uses MySQL. The book also includes a brief discussion

    of regular expressions, with a couple of short examples.

    Finally, there is a chapter explaining how to use Jython from Java, which allows the embedding of a Jython interpreter in a Java program.

    Notes: Examples run on Jython 2.0 or higher and jdk1.2 or higher.

    The book has a web site with code samples for download, and errata.

     
    4.0

    Jython Essentials Review

    By Scott Shattuck

    from Undisclosed

    Comments about oreilly Jython Essentials:

    Overall a very good effort, particularly if you're looking to understand some of the nitty gritty details of Jython. The major missing element however is any coverage of threading/synchronization. Java programming often relies heavily on threading and there is no coverage of how to do it in Jython in this book.

    I'd suggest this as a companion guide to New Riders' "Jython For Java Programmers". Each is an excellent book and they complement each other well. Between the breadth of coverage in the NR title and the depth of detail in Jython Essentials you should be outcoding straight Java programmers in no time ;).

    Displaying reviews 1-5

    Back to top

     
    Buy 2 Get 1 Free Free Shipping Guarantee
    Buying Options
    Immediate Access - Go Digital what's this?
    Ebook: $27.99
    Formats:  APK, DAISY, ePub, Mobi, PDF
    Print & Ebook: $38.49
    Print: $34.99