1 """Checkversions - recursively search a directory (default: sys.prefix)
2 for _checkversion.py files, and run each of them. This will tell you of
3 new versions available for any packages you have installed."""
10 CHECKNAME="_checkversion.py"
14 USAGE="""Usage: checkversions [-v verboselevel] [dir ...]
15 Recursively examine a tree (default: sys.prefix) and for each package
16 with a _checkversion.py file compare the installed version against the current
19 Values for verboselevel:
20 0 - Minimal output, one line per package
21 1 - Also print descriptions for outdated packages (default)
22 2 - Print information on each URL checked
23 3 - Check every URL for packages with multiple locations"""
25 def check1dir(dummy, dir, files):
26 if CHECKNAME in files:
27 fullname = os.path.join(dir, CHECKNAME)
31 print '** Exception in', fullname
34 os.path.walk(tree, check1dir, None)
39 options, arguments = getopt.getopt(sys.argv[1:], 'v:')
47 arguments = [sys.prefix]
51 if __name__ == '__main__':