■
CONTENTS
x
Making Use of a Loosely Coupled Object Factory ................................................................... 182
More Efficient Version of Loosely Coupled Object Factory....................................................... 186
Returning __doc__ Strings .................................................................................................... 188
Applying the Design to Different Object Types ........................................................................ 190
JSR-223 .................................................................................................................................... 192
Utilizing PythonInterpreter .......................................................................................................... 193
Summary ....................................................................................................................................... 195
■
Chapter 11: Using Jython in an IDE ............................................................................................197
Eclipse ........................................................................................................................................... 197
Installing PyDev ......................................................................................................................... 197
Minimal Configuration ................................................................................................................ 198
Hello PyDev!: Creating Projects and Executing Modules ............................................................. 200
Passing Command-line Arguments and Customizing Execution.................................................. 201
Playing with the Editor ............................................................................................................... 202
A Bit of Structure:
Packages, Modules, and Navigation............................................................... 204
Testing ...................................................................................................................................... 207
Adding Java Libraries to the Project ........................................................................................... 210
Debugging ..................................................................................................................................... 211
Conclusion about Eclipse ........................................................................................................... 213
Netbeans ....................................................................................................................................... 213
IDE Installation and Configuration................................................................................................... 214
Advanced Python Options............................................................................................................... 215
General Python Usage .................................................................................................................... 216
Standalone Jython Apps................................................................................................................. 216
Jython and Java Integrated Apps ................................................................................................... 221
Using a JAR or Java Project in Your Jython App ......................................................................... 221
Using Jython in Java .................................................................................................................. 222
The Netbeans Python Debugger ..................................................................................................... 223
Other Netbeans Python Features .................................................................................................... 228
Summary ....................................................................................................................................... 228
■
Chapter 12: Databases and Jython: Object Relational Mapping and Using JDBC ....................231
ZxJDBC—Using Python’s DB API via JDBC..................................................................................... 231
Getting Started........................................................................................................................... 232
Connections............................................................................................................................... 233
ZxJDBC.lookup .......................................................................................................................... 237
www.it-ebooks.info