O'Reilly logo

The Definitive Guide to Jython: Python for the Java™ Platform by Frank Wierzbicki, Leo Soto, Victor Ng, Jim Baker, Josh Juneau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Scripting With Jython

In this chapter, we will look at scripting with Jython. For our purposes, we will define "scripting" as the writing of small programs to help out with daily tasks. These tasks are things like deleting and creating directories, managing files and programs, and anything else that feels repetitive that you might be able to express as a small program. In practice, however, scripts can become so large that the line between a script and a full sized program can blur.

We'll start with some very small examples to give you a feel for the sorts of tasks you might script from Jython. Then we'll cover a medium-sized task to show the use of a few of these techniques together.

Getting the Arguments Passed to a Script

All but the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required