cvmfs/cvmfs — pull request #240 by reneme (2013-09-06 16:36:17+00:00)
Title: Python Module for easy Catalog Inspection + walkCatalogs.py

This contains some basic Python classes that allow for (interactive) CVMFS catalog inspection. This basically consolidates most of the scripts in `add-ons/tools` and makes the code re-usable. Furthermore `cvmfs.py` is designed to be a simple python module allowing for interactive catalog inspection of both remote and local catalog hierarchies.

**NOTE:**
These scripts are designed for debugging and *NOT* for performance!

**Example Session:**
```
$ python
>>> import cvmfs
>>> repo = cvmfs.OpenRepository("http://cvmfs-stratum-one.cern.ch/opt/lhcb/")
>>> repo.manifest.revision
14969
>>> root = repo.RetrieveRootCatalog()
>>> root.OpenInteractive()
sqlite> SELECT count(*) FROM catalog;
314023
sqlite> .q
>>> root.ListNested()
[, , ....]
>>> nested = repo.RetrieveCatalogForPath("/lib/lhcb/ALIGNMENT")
>>> nested.schema
1.2
>>> nested.last_modified
datetime.datetime(2013, 2, 7, 9, 9, 6)
>>> nested.RunSql("SELECT sum(size) FROM catalog;")
[(225668385,)]
>>> quit()
$
```