0
|
1 #!/usr/bin/env python
|
|
2
|
|
3 """
|
|
4 python PAckage INTrospection
|
|
5 """
|
|
6
|
|
7 import sys
|
|
8 import optparse
|
|
9
|
|
10 def main(args=sys.argv[:]):
|
|
11
|
|
12 # parse command line options
|
|
13 usage = '%prog [options]'
|
|
14
|
|
15 # description formatter
|
|
16 class PlainDescriptionFormatter(optparse.IndentedHelpFormatter):
|
|
17 def format_description(self, description):
|
|
18 if description:
|
|
19 return description + '\n'
|
|
20 else:
|
|
21 return ''
|
|
22
|
|
23 parser = optparse.OptionParser(usage=usage, description=__doc__, formatter=PlainDescriptionFormatter())
|
|
24 options, args = parser.parse_args(args)
|
|
25
|
|
26 if __name__ == '__main__':
|
|
27 main()
|
|
28
|