Book description
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 librariesand 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 comparisonsbetween 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 classesand 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 howJython 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.
Publisher resources
Table of contents
- A Note Regarding Supplemental Files
- Foreword
- Preface
- 1. Introduction to Jython
- 2. Jython Basics
- 3. Jython Control Flow
- 4. Modules and Functions
- 5. Object-Oriented Jython
- 6. Using Java from Jython
- 7. Inheriting from Java
- 8. Reflection and JavaBeans
- 9. Using Swing
- 10. Using Java Libraries
- 11. Jython Standard Library
- 12. Embedding Jython Inside Java
- 13. Compiling Jython
- A. Installing Jython
- B. Jython Options and Registry
- C. Jython Exceptions
- D. Jython and CPython Differences
- E. Java-to-Python Quick Reference
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: Jython Essentials
- Author(s):
- Release date: March 2002
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596002473
You might also like
book
Swing for Jython: Graphical Jython UI and Scripts Development using Java Swing and WebSphere Application Server
This book shows you how to use Swing to add a GUI to your Jython scripts, …
article
Run Llama-2 Models Locally with llama.cpp
Llama is Meta’s answer to the growing demand for LLMs. Unlike its well-known technological relative, ChatGPT, …
book
Python: Essential Reference
Python Essential Reference is the definitive reference guide to the Python programming language — the one …
article
Use Github Copilot for Prompt Engineering
Using GitHub Copilot can feel like magic. The tool automatically fills out entire blocks of code--but …