This post is a follow-up to the two previous posts on Ruby and Groovy which provided some sample Ruby and Groovy scripts that can be used to list repositories and search for artifacts in a Nexus instance. Today, we’re going to see how to complete the same tasks using the Python scripting language.
The following scripts are in Python and they can be invoked from the command line using python (or jython). For example, if you want to run the quick-search.py script, you would run “jython quick-search.py activemq” to search for artfiacts that contain the string “activemq”. I tested these Python scripts using the latest Jython 2.5b0 distribution with version 1.2.6 of the jython-elementtree project at Google Code. Go to the Jython page, download Jython 2.5b0, and then following the instructions on the jython-elementtree project list to check out the ElementTree library from source control and install it in your own Jython installation. These scripts don’t require Jython, the could run in any Python 2.5 implementation. Continue reading