dls.dependency_tree Python Module

1-10

Introduction

This module contains dependency_tree, a python object the represents the tree formed by nested configure/RELEASE files. It also contains dependency_tree, a python object that knows how to update dependency_tree objects to their latest versions, and how to create consistent release sets. Finally it contains dls-dependency-checker.py, a gui tool for visualising and modifying these release trees.

Dependencies

This module depends on the dls.environment module, and a version of PyQt3

Usage

It may be useful to use the dependency_tree object when trying to work out what versions of modules are currently in use in large numbers of IOCs, etc. You can use it in this way:

# import the egg
from pkg_resources import require
require("dls.dependency_tree==1.9")
from dls.dependency_tree import dependency_tree
# create a tree from the motor module
tree = dependency_tree(None,"/dls_sw/prod/R3.14.8.2/support/motor/6-3dls1")
# find all the db files and template files in all modules in the tree
print tree.paths(["/db/*.db","/db/*.template"])
# flatten the tree and return all unique trees including the root
all_trees = tree.flatten()
# print these out as a wikified list
for t in all_trees:
    print " * %s - version %s"%(t.name,t.version)

Apart from this, usage is likely to be via the dls-dependency-checker.py script.

Scripts

When the module is installed, it creates a script dls-dependency-checker.py for visualising configure/RELEASE trees. You can either run this script in the module root of the module you want to check for dependencies, or pass it an argument to the module root directory. For more usage instructions, run the script with a -h, or see the usage text

Pydoc

The doxygen documentation is a good starting point, but the Pydoc html pages are included for reference

Generated on Tue Feb 17 09:18:17 2009 for dependency_tree by  doxygen 1.5.7.1