Putting Things Together with Basic Java GUIs

As promised, we're going to extend the address book application with a GUI front end. For this extension we'll use Address5.py ,which is based on Address4.py from Chapter 8 with a few changes, all within the readAddresses() and writeAddresses() functions. One change is the use of ObjectOutputStream instead of the Python pickle module; another is the introduction of the __repr__ method for the Address class, which allows us to create address objects with eval and makes the printing of dictionaries more meaningful.

As an exercise, run the text_read_write() function in readAddresses() and writeAddresses() in both files. What differences do you notice in the output? How are these differences related to ...

Get Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.