About the Authors

Josh Juneau has been a software developer since the mid-1990s. He graduated from Northern Illinois University with a degree in Computer Science. His career began as an Oracle database administrator which later led into PL SQL development and database programming. Josh began to use Java along with PL SQL for developing web applications, and later shifted to Java as a primary base for application development. Josh has worked with Java in the form of web, GUI, and command-line programming for...

GUI Applications

The C implementation of Python comes with Tkinter for writing Graphical User Interfaces (GUIs). The GUI toolkit that you get automatically with Jython is Swing, which is included with the Java Platform by default. Similar to CPython, there are other toolkits available for writing GUIs in Jython. Because Swing is available on any modern Java installation, we will focus on the use of Swing GUIs in this chapter. Swing is a large subject, and can't be fully covered in a single chapter. In fact,...

Using Nose on Hudson

You may be wondering why we crafted a custom-built script instead of using Nose, because we stated that using Nose was much better than manually creating suites. The problem is that the Jython runtime provided by the Jython Hudson plug-in comes without any extra library, so we can't assume the existence of Nose. One option would be to include Nose with the source tree on the repository, but it is not convenient. One way to overcome the problem is to script the installation of Nose on the build...

The Netbeans Python Debugger

As mentioned previously, the Netbeans IDE also includes a Python debugger that is derived from JeanYves Mengant's jpydbg debugger. This section will discuss how to make use of the Netbeans Python debugger along with some examples using our HockeyRoster code that was written in the previous section. If you have used a debugger in another IDE, or perhaps the Java debugger that is available for Netbeans, this debugger will feel quite familiar. The Python debugger includes many features such as...

Read an Excel File

This Jython code will open and read an existing Excel file. Read an existing Excel file Book1.xls and show it on the screen from org.apache.poi.hssf.usermodel import from java.io import FilelnputStream Open an existing file and use HSSFWorkbook object to store it file H Book1.xls fis FilelnputStream file wb HSSFWorkbook fis Obtain reference to the first sheet in the workbook sheet wb.getSheetAt o rows sheet.getPhysicalNumberOfRows print wb, sheet, rows This trick ensures that we obtain the data...