Juneau
Bak
er
Ng
Soto
Wierzbic
ki
The
Definitive Guide to
Jython
Companion
eBook Available
this print for content only—size & color not accurate
CYAN
MAGENTA
YELLOW
BLACK
PANTONE 123 C
BOOKS FOR PROFESSIONALS BY PROFESSIONALS
®
The Definitive Guide to Jython:
Python for the Java
™
Platform
Dear Reader,
With Jython you enjoy the increased productivity and clarity of Python, and
the ability to integrate with existing Java™ libraries. You get the best of both
worlds: the elegance of Python, and the enterprise-readiness and maturity of
the JVM.
The Definitive Guide to Jython explores the Python programming lan-
guage from the ground up, pointing out along the way details that are specific
to Jython. If you are unfamiliar with the Python language, then you can get
started here, but you will also learn about the differences between Jython and
standard CPython as you go.
Once you have the basics of the language, you’ll want to put it into use. This
book covers a variety of topics which will help you harness the power of Jython.
You will learn how to develop dynamic applications and scripts, and access data-
bases from Jython to build powerful database applications. Fundamental to get-
ting the most out of Jython is Java integration, and this book encourages you to
use Java within Jython code as well as Jython within Java code.
Jython has matured a lot between the last couple of versions and it is now
compliant with modern versions of the Python language. This means that you
can now take advantage of Python frameworks such as Django and Pylons, which
are both covered in this book. We will also provide you with a foundation to begin
using Java Servlet and Java Swing technologies with Jython.
We hope you enjoy this book and that it helps Jython to become as useful to
you as it is to us!
Josh Juneau, Jim Baker, Victor Ng, Leo Soto, and Frank Wierzbicki
US $54.99
Shelve in:
Java, Python
User level:
Beginner –
Intermediate
www.apress.com
Available online at
www.jythonbook.com
SOURCE CODE ONLINE
Companion eBook
See last page for details
on $10 eBook version
ISBN 978-1-4302-2527-0
9 781430 225270
5 54 9 9
RELA
TED
TITLES
spine = 1.03125" 544 page count
Josh Juneau, Jim Baker, Victor Ng,
Leo Soto, Frank Wierzbicki
Foreword by Ted Leung
Enjoy the power and flexibility
of Python on the JVM
Covers
Jython 2.5
The
Definitive Guide to
Jython
Python for the Java
™
Platform
THE EXPERT’S VOICE
®
IN SOFTWARE DEVELOPMENT
www.it-ebooks.info
■
CONTENTS AT A GLANCE
ii
The Definitive Guide to Jython: Python for the Java™ Platform
Copyright © 2010 by Josh Juneau, Jim Baker, Victor Ng, Leo Soto,
Frank Wierzbicki
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-4302-2527-0
ISBN-13 (electronic): 978-1-4302-2528-7
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every
occurrence of a trademarked name, we use the names only in an editorial fashion
and to the benefit of
the trademark owner, with no intention of infringement of the trademark.
Java™ and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc., in
the US and other countries. Apress, Inc., is not affiliated with Sun Microsystems, Inc., and this book was
written without endorsement from Sun Microsystems, Inc.
President and Publisher: Paul Manning
Lead Editors: Steve Anglin,
Duncan Parkes
Technical Reviewers: Mark Ramm, Tobias Ivarsson
Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell,
Jonathan Gennick,
Jonathan Hassell, Michelle Lowman, Matthew Moodie, Duncan Parkes,
Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft,
Matt Wade,
Tom Welsh
Coordinating Editor: Mary Tobin
Copy Editor: Tracy Brown Collins
Indexer: BIM Indexers and e-Services
Artist: April Milne
Cover Designer: Anna Ishchenko
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or
visit http://www.springeronline.com.
For
information on translations, please e-mail info@apress.com, or visit http://www.apress.com.
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use.
eBook versions and licenses are also available for most titles. For more information, reference our
Special Bulk Sales–eBook Licensing web page at http://www.apress.com/info/bulksales.
The information in this book is distributed on an “as is” basis, without warranty. Although every
precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have
any liability to any person or entity with respect to any loss or damage caused
or alleged to be caused
directly or indirectly by the information contained in this work.
This book is available online under the Creative Commons Attribution-Share Alike license
(http://creativecommons.org/licenses/by-sa/3.0/). You can read the book at http://jythonbook.com.
www.it-ebooks.info