comparison lockedfile/main.py @ 0:c8c2d98afc98

initial commit (stub)
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 18 Mar 2012 20:37:19 -0700
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c8c2d98afc98
1 #!/usr/bin/env python
2
3 """
4 locked file implementation
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 class PlainDescriptionFormatter(optparse.IndentedHelpFormatter):
15 """description formatter for console script entry point"""
16 def format_description(self, description):
17 if description:
18 return description + '\n'
19 else:
20 return ''
21 parser = optparse.OptionParser(usage=usage, description=__doc__, formatter=PlainDescriptionFormatter())
22 options, args = parser.parse_args(args)
23
24 if __name__ == '__main__':
25 main()
26