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."""
11 CHECKNAME
="_checkversion.py"
15 USAGE
="""Usage: checkversions [-v verboselevel] [dir ...]
16 Recursively examine a tree (default: sys.prefix) and for each package
17 with a _checkversion.py file compare the installed version against the current
20 Values for verboselevel:
21 0 - Minimal output, one line per package
22 1 - Also print descriptions for outdated packages (default)
23 2 - Print information on each URL checked
24 3 - Check every URL for packages with multiple locations"""
26 def check1dir(dummy
, dir, files
):
27 if CHECKNAME
in files
:
28 fullname
= os
.path
.join(dir, CHECKNAME
)
32 print '** Exception in', fullname
35 os
.path
.walk(tree
, check1dir
, None)
40 options
, arguments
= getopt
.getopt(sys
.argv
[1:], 'v:')
46 VERBOSE
= string
.atoi(a
)
48 arguments
= [sys
.prefix
]
52 if __name__
== '__main__':